AWS Infrastructure
Describes the steps necessary to provision and decommission AWS Infrastructure for XOOM Cloud

Prerequisite Tools

It is helpful to have prior knowledge of Kubernetes (and kubectl), AWS Command Line Interface (CLI), Amazon EKS, AWS IAM, HELM, HELM, and YAML.
Throughout this documentation 123456789012 has been used as an example of an AWS Account Id. Please replace it with your AWS Account Id.

Kubernetes and kubectl

To use XOOM Cloud you will need to install some tools. The following provides the most common options.
This is the installation guide for kubectl:
As an alternative, Docker Desktop (free for small businesses) can be used as well. It provides a Kubernetes development environment and comes together with kubectl command. Here are the installation instructions for Docker Desktop:

AWS Command Line Interface (CLI)

This is the installation guide for aws command line tool:
It is recommended that you install v2 of the AWS CLI. Configure this tool by running:
1
$ aws configure
Copied!

Amazon EKS

You will use EKS, the Amazon Elastic Kubernetes Service. See the documentation for EKS:
See also the Installation guide for the eksctl command line tool:

AWS IAM

There will be some use of the AWS IAM, the Identity and Access Management components. You will find the documentation here:

HELM

HELM is a package manager for Kubernetes. To installation the tool, see the quite-start guide for the helm command line tool:

Kubernetes Cluster

You will create a Kubernetes Cluster to deploy an application built with XOOM Platform SDK and XOOM Cloud product. The following ins an example using the XOOM Cloud Demo:
1
eksctl create cluster \
2
--name xoom-cloud-demo \
3
--version 1.21 \
4
--region us-east-1 \
5
--nodegroup-name xoom-cloud-demo-nodes \
6
--node-type t2.large \
7
--nodes 2 \
8
--nodes-min 1 \
9
--nodes-max 2 \
10
--with-oidc \
11
--managed
Copied!
Please replace xoom-cloud-demo and us-east-1 values with the ones most appropriate for your service or application. Note that the creation of a Kubernetes Cluster requires approximately 30 minutes.
To decommission the cluster, use the following command, which is also parameterized with the xoom-cloud-demo that must be replaced with your service or application name:
1
eksctl delete cluster --name xoom-cloud-demo --region us-east-1
Copied!

AWS IAM

The XOOM Cloud Operator requires a Kubernetes Service Account with IAM roles in order to access Amazon Marketplace Metering API.

IAM Policy

Create an AWS IAM policy:
1
aws iam create-policy \
2
--policy-name XoomCloudPodPolicy \
3
--policy-document file://xoom-cloud-pod-policy.json
Copied!
Content for xoom-cloud-pod-policy.json:
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Effect": "Allow",
6
"Action": [
7
"aws-marketplace:RegisterUsage"
8
],
9
"Resource": "*"
10
}
11
]
12
}
Copied!
The command will output policy information including policy ARN. Please save this ARN. You will need it at the next step.
Alternatively, you can check the policies by running the following command and save XoomCloudPodPolicy policy ARN for later usage:
1
aws iam list-policies --scope Local
Copied!
The policy's ARN looks like this:
1
arn:aws:iam::123456789012:policy/XoomCloudPodPolicy
Copied!
Policy decommission command:
1
aws iam delete-policy --policy-arn arn:aws:iam::123456789012:policy/XoomCloudPodPolicy
Copied!

Service Account for Kubernetes

Create a Kubernetes IAM Service Account:
1
eksctl create iamserviceaccount \
2
--name xoom-cloud-service-account \
3
--namespace xoom \
4
--cluster xoom-cloud-demo \
5
--attach-policy-arn arn:aws:iam::123456789012:policy/XoomCloudPodPolicy \
6
--approve \
7
--override-existing-serviceaccounts
Copied!
The following is a service account decommission command:
1
eksctl delete iamserviceaccount \
2
--name xoom-cloud-service-account \
3
--namespace xoom \
4
--cluster xoom-cloud-demo \
5
--region us-east-1
Copied!
The name xoom-cloud-service-account must not be changed because it is used by XOOM Cloud HELM Chart.
Last modified 12d ago