|
| 1 | +# Sample installation |
| 2 | + |
| 3 | +1. Create an EKS cluster and setup kubectl context |
| 4 | + |
| 5 | +Using configuration file to simplify EKS cluster creation process: |
| 6 | +``` |
| 7 | +apiVersion: eksctl.io/v1alpha5 |
| 8 | +kind: ClusterConfig |
| 9 | +metadata: |
| 10 | + name: kfworkshop |
| 11 | + region: us-west-2 |
| 12 | + version: '1.17' |
| 13 | +# If your region has multiple availability zones, you can specify 3 of them. |
| 14 | +availabilityZones: ["us-west-2b", "us-west-2c", "us-west-2d"] |
| 15 | +
|
| 16 | +# NodeGroup holds all configuration attributes that are specific to a nodegroup |
| 17 | +# You can have several node group in your cluster. |
| 18 | +nodeGroups: |
| 19 | + - name: cpu-nodegroup |
| 20 | + instanceType: m5.xlarge |
| 21 | + desiredCapacity: 2 |
| 22 | + minSize: 0 |
| 23 | + maxSize: 4 |
| 24 | + volumeSize: 50 |
| 25 | + # ssh: |
| 26 | + # allow: true |
| 27 | + # publicKeyPath: '~/.ssh/id_rsa.pub' |
| 28 | +
|
| 29 | + # Example of GPU node group |
| 30 | + - name: Tesla-V100 |
| 31 | + instanceType: p3.8xlarge |
| 32 | + # Make sure the availability zone here is one of cluster availability zones. |
| 33 | + availabilityZones: ["us-west-2b"] |
| 34 | + desiredCapacity: 0 |
| 35 | + minSize: 0 |
| 36 | + maxSize: 4 |
| 37 | + volumeSize: 50 |
| 38 | + # ssh: |
| 39 | + # allow: true |
| 40 | + # publicKeyPath: '~/.ssh/id_rsa.pub' |
| 41 | +``` |
| 42 | +Run this command to create EKS cluster |
| 43 | +``` |
| 44 | +eksctl create cluster -f cluster.yaml |
| 45 | +``` |
| 46 | + |
| 47 | +2. Prepare S3 |
| 48 | + |
| 49 | +Create S3 bucket. [Console](https://console.aws.amazon.com/s3/home). |
| 50 | + |
| 51 | +Run this command to create S3 bucket by changing `<YOUR_S3_BUCKET_NAME>` to your prefer s3 bucket name. |
| 52 | + |
| 53 | +``` |
| 54 | +export S3_BUCKET=<YOUR_S3_BUCKET_NAME> |
| 55 | +export AWS_REGION=us-west-2 |
| 56 | +aws s3 mb s3://$S3_BUCKET --region $AWS_REGION |
| 57 | +``` |
| 58 | + |
| 59 | +3. Prepare RDS |
| 60 | + |
| 61 | +Follow this [doc](https://www.kubeflow.org/docs/aws/rds/#deploy-amazon-rds-mysql-in-your-environment) to set up AWS RDS instance. |
| 62 | + |
| 63 | +4. Customize your values |
| 64 | +- Edit [params.env](params.env), [secret.env](secret.env) and [minio-artifact-secret-patch.env](minio-artifact-secret-patch.env) |
| 65 | + |
| 66 | +5. Install |
| 67 | + |
| 68 | +``` |
| 69 | +kubectl apply -k ../../cluster-scoped-resources |
| 70 | +
|
| 71 | +kubectl wait crd/applications.app.k8s.io --for condition=established --timeout=60s |
| 72 | +
|
| 73 | +kubectl apply -k ./ |
| 74 | +# If upper one action got failed, e.x. you used wrong value, try delete, fix and apply again |
| 75 | +# kubectl delete -k ./ |
| 76 | +
|
| 77 | +kubectl wait applications/mypipeline -n kubeflow --for condition=Ready --timeout=1800s |
| 78 | +
|
| 79 | +kubectl port-forward -n kubeflow svc/ml-pipeline-ui 8080:80 |
| 80 | +``` |
| 81 | + |
| 82 | +Now you can access via `localhost:8080` |
0 commit comments