3 Models for Consuming Kubernetes in the Cloud

A Brief History on the Growth Explosion of Containers

kubernetes

A couple of years ago, Linux containers began to gain popularity among devs and ops folks alike. It was a win win scenario as the benefits of containers to both dev and ops are clear. As time moved along and the adoption of containers in production workloads exceeded many people’s expectations, the world needed a way to manage container lifecycles at scale.

Enter Kubernetes, while it is not the only proven open source container manager out there (see Docker Swarm & Mesos,) it certainly has the majority share of voice in the community. Originally a Google project that was a core component of their internal Borg system, it has since been open sourced and embraced by companies like Microsoft and Red Hat (OpenShift is powered by Kubernetes.) Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

Read more

Cloud 66 vs. Heroku – A Detailed Comparison & Business Case

VS

With the Canadian dollar on the decline and the high cost of popular US-based PaaS providers like Heroku, we are finding that more and more Canadian based SaaS providers, agency development shops and IT departments are on the lookout for an alternative solution that provide similar functionality at a lower cost.

You do not have to look very far. It is no secret that we are huge fans of our partner, Cloud 66. Cloud 66 provides full stack container management-as-a-service. What does this mean? Cloud 66 is DevOps-as-a-service and it provides you with everything you need to deploy, scale and protect your applications on a number of approved public clouds, including Cloud-A.

Let’s take a look at how Cloud 66 + Cloud-A stacks up against Heroku.

Read more

Deploy a Gitlab Server on Cloud-A with Cloud 66 and Docker

This quick start guide will show how to setup & configure a docker based Gitlab git repository platform in just minutes!

Gitlab allows development teams to create, review and deploy code together and has integrations for tons of tools such as Slack, Hipchat, LDAP, JIRA, Jenkins, many types of hooks and a complete API.

Gitlab is a great first step in building out your continuous integration / deployment and test/dev environments on Cloud-A.

What you will need before you get started :

  • Cloud-A account (free $10+ trial here) – Canada’s Favourite Public Cloud Provider
  • Cloud 66 account (free 14 day trial here) – Highly recommended Container management-as-a-Service Partner

How to setup Magento eCommerce Platform on Cloud-A in under 5 minutes

Install Magento Cloud This quick start guide will show how to setup & configure Magento eCommerce Platform in less than 5 minutes!

What you will need before you get started :

  • Cloud-A account (free $10+ trial here) – Canada’s Favourite Public Cloud Provider
  • Cloud 66 account (free 14 day trial here) – Highly recommended Container management-as-a-Service Partner
  • Access to your domain DNS (FAQ: How DNS works)

Docker in Production on Cloud-A with Cloud 66

cloud66
There is a huge buzz around Docker these days, and we are huge fans of it at Cloud-A. Docker is an essential component of our Continuous Integration System and it also runs Cloud-A’s management plane. We get lots of questions from customers about how they can run their containers on Cloud-A. Here is a look at how you can use Cloud 66 DevOps-as-a-service to deploy, scale and product your doctor container on Cloud-A.

Read more

Migrating from the Heroku PaaS to Cloud 66 & Cloud-A

cloud66

We come across clients all the time who have their applications built on Heroku, but have requirements from their clients to have their data resident in Canada. This was one of the drivers for creating the relationship we have with Cloud66. Here is a guide for migrating from Heroku to Cloud66 + Cloud-A.

About migrating from Heroku

Migrating your application from Heroku to Cloud 66 involves deploying your code, importing your data and redirecting your traffic to the new endpoint.

What server size do I need?

Using Heroku, you can choose between 1X (512 MB), 2X (1 GB) and PX (6 GB) server sizes. This makes it easy to calculate your server requirements, and we recommend that you use similar server resources when deploying your stack with Cloud 66. We also recommend that you have a separate server for your database in production environments.

Heroku-f7903473

Migrating

1. Code

Simply provide Cloud 66 the URL to your Git repository so that it can be analyzed. For more information, seeAccessing your Git repository.

2. Data

Once your code is deployed, it’s time to migrate your data across. The process differs for PostgreSQL and MySQL databases:

PostgreSQL

From your Heroku toolbelt, create a database backup URL by running heroku pgbackups:url. Next, visit your stack detail page and click the Import Heroku data link. Paste the URL provided by the toolbelt into the field, and click Import Heroku data.

MySQL

Start by dumping your existing database. Refer to the ClearDB documentation for common problems.

$ mysqldump -u [username] -p[password] [dbname] > backup.sql

Once you have a MySQL dump file, use the Cloud 66 toolbelt to upload the file to your stack database server. Remember to replace the fields below with your values.

$ cx upload -s "[stack_name]" [database_server_name] backup.sql /tmp/backup.sql

Next, use the toolbelt to SSH to your server.

$ cx ssh -s "[stack_name]" [server_first_name]

Finally, use the command below to import your backup into the database. You can find the generated username, password and database name by visting your stack detail page and clicking into your database server (eg. MySQL server).

$ mysql -u [generated_user_name] -p [generated_password] "[database_name]" < /tmp/backupfile.sql

3. Traffic

Once you’re ready to serve traffic from your Cloud 66 stack, you need to redirect your traffic to it. For more information, see Configure your DNS.

Useful pointers

Web server and Procfile

By default, Cloud 66 will deploy your stack with Phusion Passenger, but you can also choose acustom web server like Unicorn. You may have a web entry in your Procfile to do this on Heroku. Cloud 66 ignores this entry to avoid compatability issues.

To run a custom web server, we require a custom_web entry. It is important to set this before analyzing your stack, to avoid building the stack with Passenger.

You can also use the Procfile to define other background jobs.

Dyno recycling

Heroku restarts all dynos at 24 hours of uptime, which may conceal possible memory leaks in your application. When you migrate to Cloud 66, these will become noticeable because we don’t restart your workers (other than during a deployment), so the leak can grow to be bigger. A temporary solution is to re-create the Heroku restart behavior, for example with this script:

for OUTPUT in $(pgrep -f sidekiq); do kill -TERM $OUTPUT; done

This will send a TERM signal to any Sidekiq workers, giving them 10 seconds (by default) to finish gracefully. Any workers that don’t finish within this time period are forcefully terminated and their messages are sent back to Redis for future processing. You can customize this script to fit your needs, and add it to your stack as a shell add-in.

Note that this is a temporary solution, and we recommend that you use a server monitoring solution to identify the source of your leak.

Asset Pipeline Compilation

If you haven’t compiled assets locally, Heroku will attempt to run the assets:precompile task during slug compilation. Cloud 66 allows you to specify whether or not to run this during deployment.

Making your App Canadian Data Resident

Probably the simplest step in the whole process is ensuring that your application is Canadian data resident. You will need to create an account with Cloud-A. Then when you set up your stack on Cloud66 ensure that you select Cloud-A as your cloud provider of choice.

Ready to give it a try?

Get started with a $10 credit

Create my account!

Cloud-A Partners with Cloud66

We are happy to announce our partnership with Cloud 66, a leading provider of Devops-as-a-service, giving you everything you need to deploy, scale and protect your applications on Cloud-A in a single tool.

This partnership allows Cloud-A users to deploy and manage their applications more efficiently than ever before, offering one click, automated functionality for managing the lifecycle of your entire stack on Cloud-A which allows developers to do what they do best.

This partnership is part of an ongoing effort to provide Cloud-A users with world class tools to run their workflows on our high performing, secure, Canadian resident cloud servers.

Visit our Cloud 66 solutions page here for more details.