Skopos for Kubernetes

The Power of Kubernetes with the Simplicity of Visual Operations

Skopos for Kubernetes enables Fast, Reliable and Repeatable Production Deployments for Container-based Services.

Ready to try it out?
Get Started with here!

Skopos for Kubernetes

Get Skopos

Step 1: Opt-in   (optional)

Step 2: Install Skopos

Run Skopos container:

To start Skopos on a Kubernetes cluster download the following file:

skopos-k8s.yaml

Then run this command:

kubectl apply -f skopos-k8s.yaml

Step 3: Open Skopos

Open your browser:

Go to http://<hostname>:32100
to open the Skopos web UI.

Be sure to replace <hostname> with your host or IP address.

Next, here’s how to deploy your first app.

Deploy Your First App with Skopos

Now that you’ve installed Skopos for Kubernetes, here is how to set up your first deployment.

Download the Skopos Control Utility

The Skopos control utility gives you access to control Skopos directly from the command line.

wget https://s3.amazonaws.com/get-skopos/edge/linux/skopos
chmod +x skopos
sudo mv skopos /usr/local/bin

Access the Sample Application

 

This simple first deployment verifies that Skopos is installed correctly and can be controlled with Skopos utility. It also provides a practical introduction to using Skopos.

The sample application lives in a github repository https://github.com/opsani/skopos-sample-twotier. It is a simple two-tier application with a front-end and a back-end service, both replicated. The front-end service exposes a web UI which displays a page showing which front/back instances served the request. The repository contains the following relevant files:

  • compose-k8s.yaml: a v3 compose file suitable for deploying on Kubernetes (it is identical to the swarm compose file except for the exposed port). The front-end web UI externally exposed port is 30080.
  • env-v2.yaml: a Skopos target environment descriptor (TED file). This optional TED file modifies the application to deploy different versions of the front/back services. It can be used to test an application upgrade.

Note: replace ip_address with the IP address of a Kubernetes node

Run this command to deploy the sample app directly from github:

skopos stack deploy --bind ip_address:32100 \
--c github://opsani/skopos-sample-twotier/compose-k8s.yaml --profile k8s \
two-tier-k8s

 

View Your App Deployment

You can view the deployment progress in the Skopos web UI. Point a browser at port 32100 of the host on which Skopos is running: http://<ip_address>:32100/

K8S Sample App Deployment

Click on the “two-tier-k8s” app to open the detailed deployment model and plan.

K8S Sample App Deployment Progress

Open Your Newly Deployed Application

Sample Application Deployed on K8S

Once the application is deployed, you can view its web UI with a browser on port 30080 of any Kubernetes node.

Refresh the browser to see which front/back instance served the request.

http://<ip_address>:30080/

Deploy an Update

To update the sample app and watch the rolling upgrade process, first run this command to copy the update code: (replace <ip_address> appropriately)

skopos stack deploy --bind <ip_address>:32100 \
--c github://opsani/skopos-sample-twotier/compose-k8s.yaml \
--env github://opsani/skopos-sample-twotier/env-v2.yaml --profile k8s two-tier-k8s

You can see the rolling upgrade progress in the Skopos UI:

<ip_address>:32100/#/applications/two-tier-k8s/plan

Skopos Upgrading an app on KubernetesSkopos Upgrading an app on Kubernetes

Sample App Upgraded by Skopos on Kubernetes

 

 

 

 

You can also check the update progress by refreshing the browser window for the sample application UI. As the update progresses, different versions of front/back will serve requests, some with a blue theme (the old version) and some with a red theme (the new version).

Teardown the App

Now that you’ve tested Skopos functionality with the sample app, you can either continue to work with this application to get to know Skopos or you can teardown the sample application and use your own. Run this command to teardown the sample app:

skopos stack rm –bind <ip_address>:32100 two-tier-k8s

Get Acquainted with Skopos

Now that you’re all set up, here are some of the basic Skopos features to check out.

Select Your Level of Deployment Autonomy
Use the Auto-pilot steering wheel button to select the desired deployment autonomy level (usually auto-detect or auto-deploy). Auto-detect will detect changes to your application and generate a plan but it will wait for your action prior to deploy. Auto-deploy will detect, plan and deploy autonomously.

Using this setting enables multiple applications to deploy autonomously based on the change of the same container or model (e.g., multiple geographies or Dev/Test/Prod environments).

Select An Action
Use the Action button to select desired action such as Deploy, Force Replace and Teardown. To execute the selected action, use the Start button.

  • Deploy: Deploys your application, whether from scratch or an upgrade of any modified components.
  • Force Replace: Refreshes all services, even if they have not changed.
  • Teardown: Stops and removes all services of the application. The application will remain integrated with Skopos should you want to Deploy and Start it again.
View the Deployment Plan
Skopos automatically plans out your selected action (deployment, force replace or teardown) by comparing the existing application to the new desired state. Click on “Switch to Plan” button to view the generated plan. Select each step to view the detailed plugin, action and parameters for the step. Notice the rollback plan is automatically generated as well. On error, the rollback plan will execute and a detailed error message presents within the step where the failure occurred.
Deploy Your Application
To deploy your application, select the Deploy option in the Action drop down and then select Start. While the deployment proceeds, you can view the Model to see which components are updated or switch to the Plan to see each step of the deployment process get executed.
Control Your Deployment
Click “Switch to Plan” to view the available deployment actions. You can Pause/Resume, Single-Step or Abandon the deployment at anytime.

  • Pause/Resume: Stops the deployment progress and awaits further instruction. Highly useful when you really need to grab a cup of coffee during a deployment.
  • Single-Step: Allows you to step through the deployment one-step at a time. This is helpful for troubleshooting or testing a deployment plan.
  • Abandon: Stops the current deployment process and does not execute the rollback steps. Use this if you want to manually correct the deployment or fail-forward by fixing the problem and letting Skopos figure out how to deploy the change.

If the deployment hits an error, Skopos automatically rolls back the failed service keeping any successful parts of the deployment as is. Skopos will also extract and share the details of the error within the plan itself, providing you context on what failed and where it the error occurred. Also on failure, Skopos can automatically pause before rolling back. This is helpful so that you can both review and diagnose the problem determining your next steps — rollback or abandon.

Edit & View the Model, Environment and Plan Descriptors
The Model, Environment and Plan are all described in a simple YAML format. This is useful for editing the files as well as change control. Since these files are not in a database but are stored at .yaml files, you can easily check the model, environment and plan in to your code repository for a specific release. To view or edit these descriptors while in the Skopos user interface, click the { } button on the upper right of the screen. You may choose to edit the model descriptor to scale your service (add replicas) or troubleshoot a specific component. The changes made to the descriptors via this user interface will only last during your current session.

Let’s Take it to the Next Level

Enough of basics. Here’s how to begin improving your deployment process.

Implement Continuous Deployment

Skopos offers several methods for autonomous deployment of new application artifacts (code, data) to live systems including Skopos™ Auto-PilotCI/CD pipeline integration and a combination of the two.

Enable ChatOps Notifications

Skopos can send notifications to Slack whenever deploys start and end, or any other significant events occur. You can use both the pre-defined deploy notifications that come built into Skopos or create your own user-defined notifications at specific points or as a result of specific events in the deploy process.

 

Add Quality Gates

Probe your deployment at key steps to ensure success by injecting quality checks along the way. Lifecycle events can be inserted into your plan by defining them in your model file. This allows you to insert your own scripts to be executed at certain places in the plan.

We Love Feedback

If you try Skopos – or decide not to try it – please send us your feedback on what you liked and what we can improve upon.

  • This field is for validation purposes and should be left unchanged.

Want to Learn More?

Check out our documentation or contact us through our Gitter for extra help.