Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History

cli

AWS Orbit Workbench CLI

Contributing

1 - Requirements

2 - Project Setting Up

Cloning the code base locally and enter the CLI component directory

  • git clone https://github.com/awslabs/aws-eks-data-maker
  • cd aws-eks-data-maker/cli

Setting up a Python Virtual Environment

  • python -m venv .venv

Load the Python Virtual Environment

  • source .venv/bin/activate

Install all packages required for development

  • pip install -r requirements-dev.txt

3 - Deploying and Destroying

Running static validations

  • ./validate.sh

Initiating a Orbit Workbench environment with DEMO and DEV enabled

The demo flag will ensure that a mocked environment will also be deployed.

The dev flag will ensure that all artifacts will be built from source (W/o DockerHub and PyPi).

  • orbit init --demo --dev

Deploying Foundation or Environment

  • orbit deploy foundation -f my-foundation.yaml
  • orbit deploy env -f my-env.yaml

Destroying Foundation or Environment

  • orbit destroy foundation --name my-foundation
  • orbit destroy env --env my-env

4 - Assuming Admin Role to Access EKS

  • Install kubectl
  • Go to the IAM console
  • Find the Admin Role (arn:aws:iam::{ACCOUNT_ID}:role/orbit-{ENV_NAME}-{REGION}-admin).
  • Add your user or role under the Trust Relationship tab.
{
    "Effect": "Allow",
    "Principal": {
        "AWS": "arn:aws:iam::{ACCOUNT_ID}:user/{USERNAME}"
    },
    "Action": "sts:AssumeRole"
},
  • Open the temrinal and user the AWS CLI to configure your kubeconfig
  • aws eks update-kubeconfig --name orbit-{ENV_NAME} --role-arn arn:aws:iam::{ACCOUNT_ID}:role/orbit-{ENV_NAME}-{REGION}-admin
  • Validate you access
  • kubectl get pod -A

5 - Visual Studio Code tips

Recommended extensions

Recommended settings

{
    "cfnLint.ignoreRules": [
        "E1029",
        "E3031"
    ],
    "python.formatting.provider": "black",
    "python.linting.enabled": true,
    "python.linting.flake8Enabled": true,
    "python.linting.mypyEnabled": true,
    "python.linting.pylintEnabled": false
}