Setting up EKS for Charmed OSM

[In progress]

Install packages

sudo snap install juju --classic
sudo snap install jq
sudo snap install kubectl
pip3 install awscli --upgrade --user

Prepare VCA

AWS credentials

Add the credentials of your AWS account.

juju add-credential aws

You will be asked for the auth-type (choose access-key), access-key, and secret-key.

Enter credential name: aws-credential
Using auth-type "access-key".
Enter access-key: XXXXXXXXXXXXXXXXX
Enter secret-key:
Credential "aws-credential" added locally for cloud "aws".

Bootstrap Juju on AWS

Bootstrap the Juju controller, on AWS, which will be used to deploy Charmed Kubernetes.

juju bootstrap aws aws-vca --credential aws-credential

Deploy OSM VCA

The VNF Configuration and Abstraction (VCA) is a component required by Life Cycle Management (LCM), which is another OSM component. The VCA is an LXD bootstraped Juju controller that OSM will use to deploy proxy charms.

juju add-model vca
juju deploy cs:~charmed-osm/vca \
            --constraints "mem=4G cores=2 root-disk=40G" \
            osm-vca
juju offer osm-vca:osm-vca

Setup EKS Cluster

REGION=us-east-1
ZONES=us-east-1a,us-east-1b,us-east-1c
CLUSTER_NAME=eks-cluster
NODE_TYPE=t3.xlarge
STORAGE_GB=100
NUM_NODES=3

eksctl create cluster \
--name ${CLUSTER_NAME} \
--version 1.14 \
--nodegroup-name standard-workers \
--node-type ${NODE_TYPE} \
--nodes ${NUM_NODES}  \
--nodes-min 1 \
--nodes-max 4 \
--node-volume-size ${STORAGE_GB} \
--node-ami auto \
--region ${REGION} \
--zones ${ZONES}

Add EKS cloud to Juju

  1. Update ~/.kube/config:
aws eks update-kubeconfig --name ${CLUSTER_NAME}
  1. Get Token:
aws eks get-token --cluster-name ${CLUSTER_NAME} | jq -r '.status.token'
  1. Get Certificate Authority Data:
aws eks describe-cluster --name ${CLUSTER_NAME} \
                         --query cluster.certificateAuthority.data
  1. Add EKS cloud to juju
CLOUD_NAME=eks-cloud
cat ~/.kube/config | juju add-k8s ${CLOUD_NAME} --local --region=aws/$REGION
juju add-credential ${CLOUD_NAME}
# Enter credential name: eks-cluster-cred
#
#Using auth-type "certificate".
#
#Enter ClientCertificateData: "LS0xxxxxxxxxxLQo="
#
#Enter Token: 

Bootstrap K8s controller on EKS

juju bootstrap ${CLOUD_NAME} --credential eks-cluster-cred
juju add-model osm

Deploy Charmed OSM

juju deploy osm-ha
juju add-relation lcm-k8s aws-vca:admin/vca.osm-vca
juju add-relation mon-k8s aws-vca:admin/vca.osm-vca