From June 2018

Deploy Hyperledger Composer on Oracle Cloud Container Native (Managed Kubernetes) in less than 30 Minutes


PART ONE: PREPARE YOUR ENVIRONMENT

Get a cloud account, log in with your IdCS credentials, go to the Compute (new OCI) dashboard and create a local user:

k8s-hyper-composer-01

Create a Policy:

k8s-hyper-composer-02

Add the following policy statements it they don’t exist:

k8s-hyper-composer-03

Create a Compartment:

k8s-hyper-composer-00

Create a Virtual Cloud Network (VCN) and 3 subnets on it in case you don’t have one already:

k8s-hyper-composer-05

k8s-hyper-composer-06

PART TWO: CREATE THE K8S CLUSTER

Go to Containers menu, click Create Cluster Button:

k8s-hyper-composer-10

Introduce the proper information and Click Create:

 

k8s-hyper-composer-11

Add compute resources to the cluster (Pools):

k8s-hyper-composer-12

k8s-hyper-composer-13

Obtain information for managing the K8s cluster from command line (kubectl):

k8s-hyper-composer-14

k8s-hyper-composer-15

Start k8s dashboard:

k8s-hyper-composer-20

PART THREE: DEPLOY HYPERLEDGER COMPOSER

Open dashboard in browser:

k8s-hyper-composer-21

Locate the kubeconfig file and Sing In:

k8s-hyper-composer-22

k8s-hyper-composer-23

In the dashboard click Create button in the upper right corner:

k8s-hyper-composer-24

Locate the Hyperledger container in docker hub:

k8s-hyper-composer-25

Provide the appropiate info in the dialog:

k8s-hyper-composer-26

Wait for the service to be created and ready:

k8s-hyper-composer-27

Click on the public url and test it!:

k8s-hyper-composer-28

That’s it!

Enjoy 😉

 

Create a container with Oracle JET app in it


We’re gonna create a container and then push to a repo for later use.

First we create the local app and test it:

cd

mkdir myjetappcontainer

npm install -g @oracle/ojet-cli

ojet create myjetapp --template=navdrawer

cd myjetapp

ojet serve (test it and then CTRL+C)

Now let’s create the container, fisrt the Dockerfile:

vi Dockerfile
FROM oraclelinux:7-slim

WORKDIR /app

ADD . /app

RUN curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

RUN yum -y install nodejs npm

RUN npm install -g @oracle/ojet-cli

EXPOSE 8000

CMD ["ojet","serve"]

And now lets build and push the container to a repo:

docker build -t myjetapp .

docker login

docker push javiermugueta/myjetapp

 

Enjoy 😉