You can quickly provision a Kubernetes cluster with Portworx running on AWS. Here’s how.
- Install the AWS CLI:
sudo yum install -y epel-release git unzip gcc fuse fuse-devel
sudo yum install -y python-pip
sudo pip install awscli
aws configure
- Install Vagrant:
curl https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_linux_amd64.zip | funzip >vagrant
sudo install -m 755 vagrant /usr/local/bin/vagrant
- Install Node.js and the json module:
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum install -y nodejs
sudo npm install -g json
- Install Vagrant AWS plugin and dummy box:
vagrant plugin install vagrant-aws
vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
- Clone the repo:
git clone https://github.com/andrewh1978/px-aws-k8s-multi
cd px-aws-k8s-multi
-
Edit
create-vpc.sh
and updateAWS_DEFAULT_REGION
if necessary. -
Edit
Vagrantfile
. At the least, you will need to updatekeypair_name
. -
Generate some SSH keys:
ssh-keygen -t rsa -b 2048 -f id_rsa
These will only be used for SSH between nodes.
- Provision the VPC:
. create-vpc.sh
- Start the cluster(s):
vagrant up
- After a few minutes, both the Kubernetes and Portworx clusters will be up and running:
vagrant ssh master-1
sudo -i
kubectl get nodes
ssh node-1-1 pxctl status