/tweeter-rails

A Kubernetes demo Rails app

Primary LanguageRuby

Tweeter

build status

coverage report

Rails demo app for Kubernetes.

Prerequisites

The easiest way to get and play with Kubernetes on your developer workstation is using minikube.

Alternatively, sign up for and used Google Cloud Platform and spin up a Google Container Engine cluster.

Install Helm

helm init

Deployment

Create the tweeter namespace

kubectl create namespace tweeter
kubectl config set-context $(kubectl config current-context) --namespace tweeter

Services

Deploy MongoDB

Using Helm

helm install --namespace tweeter --name tweeter-mongodb stable/mongodb

Deploy Redis

Using Helm

helm install --namespace tweeter --name tweeter-redis \
--set redisPassword=secretpassword stable/redis

Verify that the services are running

kubectl get services -w

Tweeter

Create Tweeter secrets

kubectl create -f tweeter-secrets.yaml

Deploy Tweeter front-end

kubectl create -f tweeter.yaml

Wait for the pods to be Running

kubectl get pods -w
Connect to the Tweeter front end
kubectl get services

Take note of the tweeter port, then visit $(minikube ip):port.