Skip to main content
Version: 2.4.7

Deploy Resoto with AWS Cloud Development Kit

The Resoto Cloud Development Kit (CDK) construct gives more control over the setup than the CloudFormation template.

Prerequisites

Deploying Resoto

  1. Run the following commands in the terminal:

    $ git clone git@github.com:someengineering/resoto-cdk.git
    $ cd resoto-cdk
    $ npm ci
  2. Then, deploy Resoto with the following command:

    $ npm run cdk deploy -- --parameters ResotoTag=2.4.7
    note

    If this is your first CDK deployment, you will need to bootstrap your AWS account. You can do so with the following command:

    $ npm run cdk bootstrap
    info

    It is possible to override the default CloudFormation parameter values:

    $ npm run cdk deploy -- --parameters ResotoTag=2.4.7 --parameters MngInstanceType=t3.large
    ParameterDescriptionDefault Value
    ResotoTagThe Resoto image tag to use2.4.7
    MngMaxSizeThe maximum number of instances in the k8s managed node group3
    MngMinSizeThe minimum number of instances in the k8s managed node group1
    MngDesiredSizeThe desired number of instances in the k8s managed node group1
    MngInstanceTypeThe instance type of the k8s managed node groupt3.medium
  3. Confirm the deployment. This will trigger CDK to create an EKS cluster and install the Resoto Helm chart.

    info

    The deployment will take approximately 30 minutes. You can follow the progress in the terminal.

    Once deployment is complete, you will see output similar to the following:

    Outputs:
    east-test-1.easttest1ClusterName8D8E5E5E = east-test-1
    east-test-1.easttest1ConfigCommand25ABB520 = aws eks update-kubeconfig --name east-test-1 --region us-east-1 --role-arn <ROLE_ARN>
    east-test-1.easttest1GetTokenCommand337FE3DD = aws eks get-token --cluster-name east-test-1 --region us-east-1 --role-arn <ROLE_ARN>

    Stack ARN:
    arn:aws:cloudformation:us-east-1:115717706081:stack/east-test-1/e1b9e6a0-d5f6-11eb-8498-0a374cd00e27e
  4. Once the stack creation is completed, you need to configure access to the newly created EKS cluster. Open the Outputs tab of the CloudFormation stack and copy the value of the resotoeksstackConfigCommand key:

    kubectl output command

  5. Execute the copied command in the terminal.

Launching the Command-Line Interface

The resh command is used to interact with resotocore.

Simply execute the following to access the Resoto Shell interface:

$ kubectl exec -it service/resoto-resotocore -- resh

Resoto Shell

Removing the Resoto Deployment

To remove the Resoto deployment and all associated resources, run the following command in the terminal:

$ cdk destroy
danger

Removing the Resoto stack will also delete all data stored in the Resoto database.