This repository provides the reference multi-nodes environment to install PrimeHub.
It will create these resources
- Create 3 VMs for k8s nodes (10.20.0.11, 10.20.0.12, 10.20.0.13)
- Create 1 VM for NFS and Harbor (10.20.0.14)
- All 4 VMs are in the same VPC
- All 4 VMs have public IPs
- The OS image is AWS official RHEL 7.9 20220512
- AWS account
- Prepare a AWS account. You can use a free AWS account
- Configure
$HOME/.aws
. Please see AWS document - Prepare key pairs in AWS console
- Docker
Variables | Description |
---|---|
NAME | Cluster name. We use it as the prefix of resources. |
USERNAME | The owner of the cluster. We will tag resources with the tag owner with the USERNAME. |
KEY_NAME | the name of your key pair |
docker run --rm -it \
-v $HOME/.aws:/root/.aws:ro \
-e NAME=demo \
-e USERNAME=demo \
-e KEY_NAME=demo_key \
infuseai/cdk:v0.1 cdk deploy
Once the creating completed, the output shows public IPs of created VMs. You can login these VMs by SSH command
ssh -i /path/to/saved_private_key -A ubuntu@<public_ip>
After logging in the first node, you can log in to other nodes via private IP
ssh -A 10.20.0.11
ssh -A 10.20.0.12
ssh -A 10.20.0.13
ssh -A 10.20.0.14
Optionally, you can connect to server with name. Edit the ~/.ssh/config
, add these settings
Host my_cluster_name
User rhel
IdentityFile /path/to/saved_private_key
Hostname 1.2.3.4
ForwardAgent yes
and connect again
ssh my_cluster_name
docker run --rm -it \
-v $HOME/.aws:/root/.aws:ro \
-e NAME=demo \
-e USERNAME=demo \
-e KEY_NAME=demo_key \
infuseai/cdk:v0.1 cdk destroy