Skip to main content

AWS & Marketplace

Introduction#

Kupboard can be run in any environment where Docker runtime is installed. This section explains how to install and run kupboard registered with AWS Marketplace, and how to use the kupboard commands to build cloud native environment with a simple configuration.

note

If you use a kupboard container of Dockerhub instead of AWS Marketplace, skip the subscription process and move to Servers to create EC2 instances.

Subscription#

To use Kupboard, you should search for kupboard in the AWS Marketplace and select [Continue to Subscribe].


aws-install-01


When the subscription process is complete, select [Continue To Configuration] to go to the settings page.


aws-install-02


Select Delivery Method and Software Version from the settings menu and select [Continue to Launch].


aws-install-03


Now you are ready to run Kupboard. Select the [View container image details] link at the bottom of the page to see commands for pulling the Kupboard container image.


aws-install-04


Installation#

You must first install awscli to use a maintainer registered with AWS Marketplace. If it's not installed, please visit Installing, updating, and uninstalling the AWS CLI

note

Before using awscli, you must define the credentail of your AWS account as follows. If you're not familiar with awscli, please check Set up AWS Credentials and Region for Development.

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

Login to registry#

Before you pull a container image from AWS Marketplace, you must first sign in to the registry of AWS Marketplace.

$ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com

Pull kupboard image#

If the login is successful, pull the container image.

$ docker pull 709825985650.dkr.ecr.us-east-1.amazonaws.com/atop-cloud/kupboard:0.9.0

Run kupboard#

If the kupboard container is pulled properly, you should see the following results when using the docker run command.

$ docker run --rm -it 709825985650.dkr.ecr.us-east-1.amazonaws.com/atop-cloud/kupboard:0.9.0
___ _ __ __ _______ _______ _______ _______ ______ ______
| | | || | | || || _ || || _ || _ | | |
| |_| || | | || _ || |_| || _ || |_| || | || | _ |
| _|| |_| || |_| || || | | || || |_||_ | | | |
| |_ | || ___|| _ | | |_| || || __ || |_| |
| _ || || | | |_| || || _ || | | || |
|___| |_||_______||___| |_______||_______||__| |__||___| |_||______|
v0.9.0
04:04:15.849 KBD â–¶ INFO [Configuration : kupboard]
04:04:15.849 KBD â–¶ INFO version: v0.1
04:04:15.849 KBD â–¶ INFO company: atopcloud
04:04:15.849 KBD â–¶ INFO name: hello kupboard
kupboard is a root command for managements of the Kupboard platform.
Usage:
kupboard [flags]
kupboard [command]
Available Commands:
build Build application containers
kollection Deploy applications and install packages
deploy Deploy services on target clusters
help Help about any command
setup Initialize target clusters
ssh ssh connection to a target host
Flags:
--config string config file (default "kupboard")
--debug enable debug
-e, --envvar string ansible envvars
-h, --help help for kupboard
--hide-log diable logging
--hide-logo hide kupboard logo
Use "kupboard [command] --help" for more information about a command.

Bash script for running kupboard (Recommended)#

Instead of using docker run to run the kupboard container, you can use bash script below, which is much simpler.

#!/bin/bash
docker run --rm -it 709825985650.dkr.ecr.us-east-1.amazonaws.com/atop-cloud/kupboard:0.9.0 "$@"

This is an example of using the bash script to run kupboard.

$ kupboard setup --init-user

To mount a data folder, use -v option.

#!/bin/bash
docker run --rm -it -v $(pwd)/data:/kupboard/data 709825985650.dkr.ecr.us-east-1.amazonaws.com/atop-cloud/kupboard:0.9.0 "$@"

Servers#

Kupboard clusters can be configured in a variety of ways depending on the service and application. In this example, we will create 1 server for the admin cluster, 1 server for the gateway cluster, and 4 servers for the service cluster.

note

Ec2 instances are manually created and managed in version kupboard0.9, but the feature to automatically manage instances will be added in a future release.

EC2 Instance#

You need to create 6 EC2 instances as the table below. OS for all instances must be Ubuntu18.04 or 20.04, and all instances must use the same key pair. The size of EBS volumes should change depending services or pakcages installed on the service cluster.

ClusterEC2 TypeQuantityBoot VolumeEBS Volume
Admint3.meidum <150GBN/A
Gatewayt3.meidum <150GBN/A
Servicet3.large <450GB50GB <
info

Instances of the service cluster must have EBS volumes. This does not require an additional format or mount operation because they are automatically controled by kupboard during cluster initialization.

note

kupboard-0.9 only supports Ubuntu hosts, but future versions will also support CentOS.

Security Group#

Create security groups for kupboard clusters and set Inbound and Outbound as shown below.

ClusterInboundSource
All220.0.0.0/0
1 - 65535kupboard cluster
Admin80,4430.0.0.0/0
Gateway80,4430.0.0.0/0
ClusterOutboundDestination
All1 - 655350.0.0.0/0

Data#

Move to Data