How to deploy a container to the IBM Cloud Kubernetes service

I want to describe another way to run the  Highscores-Service of the #BlueCloudMirror game . In the game I use  IBM Cloud Foundry apps, now I want to explore IBM Cloud Kubernetes.

Note: The #BlueCloudMirror game we  @Niklas, @Harald and I made, is available as an Pattern on IBM Developer.

The first step was creating a container for the Highscores-Service,  which I described in my blog post how to build a container.

In this post I deploy my scores-service container to the IBM Cloud Kubernetes service.  This is  not a blueprint for IBM Kubernetes deployments, if you looking for a blueprint,  just take a look hereIBM Cloud documentation contains a great guide for getting started:  How to setup and use IBM Cloud Kubernetes

I share my experiences and observations with you, along with my deployment.

Let’s start with an overview of the topics I touch in this blog post:

Simplified Architecture 

kube-basic-architecture

The above picture shows a simplified architecture for the scores-service inside Kubernetes. You can see the relevant elements for the deployment. If you are interested in the details of  these elements, just click on the linked Kubernetes documentation.

The major elements:

Continue reading

How to build a container

I want to describe another way to run the  Highscores-Service of the #BlueCloudMirror game . In the game I use  IBM Cloud Foundry apps, now I want to explore IBM Cloud Kubernetes.

Note: The #BlueCloudMirror game we  @Niklas, @Harald and I made, is available as an Pattern on IBM Developer.

Let’s get started with the first step, building a container which contains the Scores-Service using Docker .

This blog post is all about building and running a docker container on a local machine.

Topics you will find in this post: my experience of  learning how configure a Dockerfile along  with my creation of the Dockerfile for the score-service, including following steps:

  • Choosing the base image
  • Installing the needed packaging tools
  • Defining the source code location and copying the source code into the container
  • Configuring a new user and group for Bower , a package manager
  • Setting up the Score-Service
  • Running the Score-Service container locally

Note: This is not a blueprint, this is just how I did it and I share my experience with you.

Architecture of the Scores-Service

This is the relevant architecture for building the Docker container.  The Scores-Service UI and the Scores Core Service will run in the Docker container locally. The Cloudant service still runs on IBM Cloud.

scores-service-docker

 

Continue reading