Hello, this is Mark Brandon, CEO and Co-Founder of Qbox, the creators of Supergiant.
Today we’re going to show you some of the cool things you can do with Supergiant, namely deploying a blog application straight from Docker Hub into your private Kubernetes environment.
We’re going to start from the Supergiant dashboard, but before we do that, I’m going to find a suitable container for the popular blogging platform, Ghost.
There are several public containers, but fortunately, there is an officially supported container complete with well-documented instructions.
From our dashboard, the first thing I’m going to do is create an App. For simplicity, I’ll just name it “Blog.”
Now we have an empty app. Apps aren’t useful of course until you add components. I’ll name my component “ghost server.”
Components are the key to understanding Supergiant. Within components, you have the data volumes, containers, and container networking. We need to add containers and data volumes.
I’m going to first add a data volume. We’ll name it ghost-data and give it 40GB of SSD storage.
Now I have a volume, so the next thing I need to do is add my container.
To specify a docker image, I need to provide a path. If you’re using Docker Hub, you can use the path specified after the pull command. In this case, it is just “ghost.” If I wanted to use another public container, I would use its full path.
Next I will specify a CPU value. Supergiant will automatically scale nodes within this range. Five hundred cores is a lot, but remember we won’t use that much until it’s needed. In actuality, half of one CPU is sufficient to run a medium-sized blog.
Next I’m going to select RAM. By putting a zero in both fields, I’m telling Supergiant to use as much RAM as is available within our giant resource pool and that is required by Ghost at any given moment.
If you have custom commands or environment variables, this is the place to put them, but it’s not necessary for this example.
We do want to mount the volume we just created. The volume name is ghost-data, and we want to specify the path, according to the instructions.
We need to expose ports and make it public. For this image, 2368 is the appropriate port. The protocol is HTTP. We need to make it public. It’s important to know that Supergiant currently requires this port to be between 30000 and 40000. I’m going to pick a number at random, say, 30211.
If you designate Public, then it needs to be attached to an entry point. For this install, the entry point is just Supergiant.
You’ll notice that the component is still not running. We have to deploy it. To do that, go to Releases, Create a New Release, and then deploy it. After a few seconds, you’ll see this component is now running.
All we have to do now is put in the address with the port we specified, and voila, we now have a running ghost instance. Users of ghost will recognize this screen.
More importantly, this instance is set to scale up and down according to its needs within the confines of our resource allocations, giving us both performance and cost efficiency.