GithubHelp home page GithubHelp logo

blueperf-acmeair's Introduction

blueperf-acmeair

To clone, build, push and deploy Acme Air micro-services app

Prepare source repos

  1. Git clone this repo
git clone https://github.com/SanjeevKGupta/blueperf-acmeair.git
  1. Git clone original acme repo or your own forked repo in blueperf-acmeair
cd blueperf-acmeair

git clone https://github.com/SanjeevKGupta/acmeair-authservice-java.git
git clone https://github.com/SanjeevKGupta/acmeair-bookingservice-java.git
git clone https://github.com/SanjeevKGupta/acmeair-customerservice-java.git
git clone https://github.com/SanjeevKGupta/acmeair-flightservice-java.git
git clone https://github.com/SanjeevKGupta/acmeair-mainservice-ja
  1. Setup ENV as per your project
# An arbitrary value to organize your image name
export EDGE_OWNER=<sn.cedge>
# An arbitrary value to organize your image name
export EDGE_DEPLOY=<ex.mesh.rhsi.acmeair>

# The architecture of the worker nodes
export ARCH=amd64

### Authenticated IBM CR access ###
export CR_HOST=<cr-host>
export CR_HOST_USERNAME=cr-host-username>
export CR_HOST_NAMESPACE==cr-host-namespae>
export CR_APP_API_KEY_RO_PULL=<cr-RO-api-key>
export CR_APP_API_KEY_RW_PUSH=<cr-RW-api-key>

Build and push images

  1. Build and push images into your authenticated container image registry. Each build takes about 10-15 mts.
cd mesh/rhsi/publish
make build-push-authservice
make build-push-bookingservice
make build-push-customerservice
make build-push-flightservice
make build-push-mainservice

Deploy the application

If you are deploying directly, you will still need to setup above ENVIRONMENT variables for the make command to work. Reach out to me for these values.

  1. Log into the target K8s cluster
  2. Extract KUBECONFIG and export
kc config view --raw --minify > kubeconfig-<cluster>.yaml
export KUBECONFIG=kubeconfig-<cluster>.yaml
  1. Deploy the services This will create all the k8s objects - deploy, pod, services etc.
  • mainservice provides the ingress URL used by the app.
  • mainservice and authservice do not have backend databases. Other three services have.

Each service with its database

Each service and corresponding database together in one namespace each. You should change the namespace name as per your preference. Below are examples.

make deploy-mainservice NAMESPACE=zz-test-main CLUSTER_TYPE=ROKS/K8S
make deploy-authservice NAMESPACE=zz-test-auth CLUSTER_TYPE=ROKS/K8S
make deploy-bookingservice-db NAMESPACE=zz-test-booking CLUSTER_TYPE=ROKS/K8S
make deploy-customerservice-db NAMESPACE=zz-test-customer CLUSTER_TYPE=ROKS/K8S
make deploy-flightservice-db NAMESPACE=zz-test-flight CLUSTER_TYPE=ROKS/K8S

All services and all databases

All services in one namespace and all databases in one namespace. mainservice (UI) in a seperate namespace.

make deploy-mainservice NAMESPACE=zz-test-grp-main CLUSTER_TYPE=ROKS/K8S

make deploy-authservice NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-bookingservice NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-customerservice NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-flightservice NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-booking-db NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-customer-db NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S
make deploy-flight-db NAMESPACE=zz-test-gro-service CLUSTER_TYPE=ROKS/K8S

make deploy-booking-db NAMESPACE=zz-test-gro-db CLUSTER_TYPE=ROKS/K8S
make deploy-customer-db NAMESPACE=zz-test-gro-db CLUSTER_TYPE=ROKS/K8S
make deploy-flight-db NAMESPACE=zz-test-gro-db CLUSTER_TYPE=ROKS/K8S

View application in the browser

  1. ROKS: Get the Loadbalancer EXTERNAL-IP
  2. K8s (IKS) Get the ingress from the namespace where mainservice is running
kubectl get ing -n <mainservice-namespace>
  1. Access using ingress or Loadbalancer url with path as /acmeair
http://<url>/acmeair/
  1. Login using the UI. Use the default as prompted.
  2. Initialize various databses using the UI or CLI
curl http://acmeair.apps.your.clusterhost.com/booking/loader/load
curl http://acmeair.apps.your.clusterhost.com/flight/loader/load
curl http://acmeair.apps.your.clusterhost.com/customer/loader/load?numCustomers=10000

Reference: https://github.com/blueperf/acmeair-mainservice-java

blueperf-acmeair's People

Contributors

sanjeevkgupta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.