This is a Hello World project where you can add a programming language and its hello world code. It comprises of a frontend ReactJS application, a Python Flask backend API application, and a MongoDB database. The goal of this project is to compile each individual service into its own container image and deploy to a kubernetes cluster on IBM Cloud.
Create an IBM Cloud account if you haven't done so already
- Open IBM Cloud console
- Go to Manage > Access (IAM)
- In the new window, on the left navigation menu, select API Keys, and Create an IBM Cloud API Key.
- Copy the key and store it somewhere safe
- Click on "Catalog" in the header menu on IBM Cloud
- Search for "Container Registry", and select "Container Registry"
- Click on Create button, to create a new Container Registry
- Navigate to the "Namespaces", and click "Create +" button to add a new namespace.
Install Docker on your machine
- Install Docker Desktop, and login to Docker Desktop Create Docker Hub Account Here, If you don't already have one.
docker login us.icr.io/<container_registry_namespace> -u iamapikey -p <ibm_iam_cloud_api_key>
docker pull mongo:4.2.6
Still in the root directory of this project, run the commands to build and push the image for each service:
HelloWorld Flask
docker build -t us.icr.io/<container_registry_namespace>/helloworld-flask helloworld-flask
docker push us.icr.io/<container_registry_namespace>/helloworld-flask
HelloWorld React
docker build -t us.icr.io/<container_registry_namespace>/helloworld-react helloworld-react
docker push us.icr.io/<container_registry_namespace>/helloworld-react
See Runbook Here
To Run each individual project, see their respective README
I created a terraform script to deploy a free kubernetes cluster to ibm cloud, and run the deploy the kubernetes resources using a bash script. See Runbook Here