Skip to content

oslabs-beta/deckhand

Repository files navigation

KubernetesTerraformDockerHelmAmazon AWSReactReduxNode ExpressPostgreSQLJavaScriptTypeScriptCSS3JestBabel

Ahoy! And welcome to the exciting world of Kubernetes. I'm your Deckhand.

I'll help you deploy a Kubernetes cluster with no code. Fully automated. Open source.

  • Simple to use: Visual drag and drop interface lets you virtually craft your system design, so you can focus on what matters and automate the rest.

  • Connect any software: Instantly search for and connect any commercial or open source software, including your private Github repositories, and deploy it with a click.

  • No vendor lock-in: We'll deploy directly to your linked cloud provider, so you can involve Deckhand as much or as little as you'd like, and take back the wheel at any time.

Features

Behind the scenes, Deckhand abstracts away all the work of deploying an application on Kubernetes, including:

  • Setting up VPCs, subnets, route tables, security groups, and gateways
  • Provisioning an EKS cluster and installing all the necessary add-ons
  • Spinning up EC2 instances as nodes in the cluster
  • Implementing an EFS for volume storage
  • Dockerizing Github repos and pushing to ECR
  • Pulling down Docker Hub images
  • Scanning images for necessary environmental variables and exposed ports, guiding the user to add them to their configurations
  • Generating YAML files for deployments, services, configmaps, secrets, persistent volume claims, and ingresses
  • Applying all the YAML files to your cluster
  • Obtaining a public url for your app
  • Automating the entire teardown process with a single click

Getting Started

Clusters

When you create a new project, you will be presented with an empty canvas. The ocean is yours, and the winds are favorable. Drag a Cluster element on the screen and select the resources (instance type and number of nodes) you’d like to provide for your application. Want to scale vertically? Select a more powerful instance type. Want to scale horizontally? Increase the number of nodes.

Pods

Next, drag over a Pod and connect it to your cluster. Here, you can choose between pulling in a Docker image or a GitHub repository. With your connected GitHub account, you can even pull in your private repositories. Deckhand automatically builds and stores your containerized application image. Do this for each of the microservices in your application. Do some parts of your application require particularly high availability and reliability? Simply adjust the number of replicas using the up and down arrows on the pod.

Ingresses

Drag over an Ingress element and connect it to a pod to define the entry point to your application. Deckhand will automatically scan the connected pod to find the correct ports upon deployment.

Variables

Have any environmental variables? Drag over a Variables element, connect it to the relevant pods, and Deckhand will scan the repository for the required variables. Simply enter those values where prompted, and Deckhand will encode and configure the ConfigMap and Secrets upon deployment.

Volumes

Need persistent storage? Drag over a Volume element, connect it to a pod, and enter the mount path. Deckhand will provision the necessary persistent volume claims, storage classes, and volumes upon deployment.

Deployment

And when you’re ready, hit deploy. Deckhand will update with the URL for your running, load-balanced application.

Link Third-Party Accounts

GitHub

GitHub is required to search, build, and deploy your Git repositories into Kubernetes pods. It is also how you log into Deckhand.

If you haven't already, first create GitHub account. Then, from the Deckhand login page, click "Log in with GitHub". This will redirect you to GitHub to authorize Deckhand to access your account and repositories. Click "Authoize Deckhand". This will redirect you back to the Deckhand app and log in.

Amazon Web Services (AWS)

We deploy directly to your AWS account. The specific services automated include AWS VPC, EKS, EC2, ECR and EFS. All keys are encrypted with AES-256.

If you haven't already, first create an AWS account. Then:

Create Deckhand IAM user

  1. Login to AWS account as a root
  2. Navigate to IAM -> Users -> Create User
  3. Enter user name as "deckhand"
  4. Check "Provide user access to the AWS Management Console"
  5. Select "I want to create an IAM user"
  6. Click "Next"
  7. Select "Attach policies directly"
  8. Search and check the "AdministratorAccess" policy
  9. Click "Create User"
  10. Save a record of your console sign-in URL, username, and password

Get credentials for Deckhand IAM user

  1. Visit console sign-in URL, login as IAM user, and change password on login
  2. Navigate IAM -> Users -> deckhand -> "Security credentials" tab
  3. "Access keys" section -> Create access key
  4. Select Command Line Interface (CLI)
  5. Check "I understand the above recommendation…"
  6. Click "Next"
  7. Click "Create access key"
  8. Save a record of your "Access key" and "Secret access key"
  9. Enter these credentials in Deckhand when prompted to link your AWS account

Troubleshooting

Building Pods

If running locally, make sure the dependencies listed above are installed. Make sure Docker is also actively running. Building repos and scanning ports uses the local Docker Daemon to execute docker commands.

Make sure Github repositories contain a Dockerfile. This is required for containerization and for autodetection of exposed ports during deployment.

Deploying Pods

An inability to deploy is typically an indication that there are not enough resources in your cluster to support the pods you are trying to run.

To troubleshoot, make sure you have enough resources in your cluster. Adjust the following in your cluster configuration and try deploying again:

  • Increase the number of nodes
  • Select instance type with higher capacity

Future Development

Deckhand currently fully automates the deployment of Kubernetes clusters to Amazon Web Services (AWS), but let’s not drop the anchor there. We intentionally built the app using HCL and Terraform to maximize platform agnosticism. Future high-priority developments include:

  • Google Cloud Platform support
  • Microsoft Azure support
  • Advanced cluster health and cost monitoring

As an open source product, we welcome your contributions! See the Contributing page for details.

Star us on GitHub!

⭐ Anchor your support with a star! Your star not only supports our work but also boosts our visibility and community engagement. It's a simple gesture that propels our open source mission forward.