Skip to content

Provides the reference multi-nodes environment in AWS

License

Notifications You must be signed in to change notification settings

huaichehuang/multinodes-aws

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository provides the reference multi-nodes environment to install PrimeHub.

It will create these resources

  1. Create 3 VMs for k8s nodes (10.20.0.11, 10.20.0.12, 10.20.0.13)
  2. Create 1 VM for NFS and Harbor (10.20.0.14)
  3. All 4 VMs are in the same VPC
  4. All 4 VMs have public IPs
  5. The OS image is AWS official RHEL 7.9 20220512

Prerequisites

Deploy

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

Destroy

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

About

Provides the reference multi-nodes environment in AWS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.7%
  • Shell 8.2%
  • Dockerfile 8.1%