Skip to content

Latest commit

 

History

History
96 lines (79 loc) · 3.5 KB

README-DevOps.md

File metadata and controls

96 lines (79 loc) · 3.5 KB

Deploying nameko-devex

Airship Ltd

Docker

Prerequisites deployment to Docker

Setup

  • Deploy nameko microservice in docker
make deploy-docker
  • Smoketest your landscape via make smoke-test, make sure you are in your namekoexample conda environment
  • You could also performance test your landscape via make perf-test
  • To undeploy/stop, Control-C above process

Please read the Makefile for more details on the commands

K8S using KinD

Prerequisites deployment to K8S

  • Docker (see above)
  • Kubernetes in Docker - KinD

Setup

  • Deploy nameko microservice in K8S
cd k8s
make deployK8
  • Smoketest your landscape via make smoke-test, make sure you are in your namekoexample conda environment
  • You could also performance test your landscape via make perf-test
  • To undeploy, use make undeployK8

Please read the Makefile for more details on the commands

Cloudfoundry

Prerequisites deployment to CloudFoundry

$ brew install cloudfoundry/tap/cf-cli

Setup

For below instruction, we are assuming you have created a free CF acount from Pivotal. We are using their free backing service from there.

  • Login into CF account. Read quick tutorial

  • Activate environment before running deployment script

$ conda activate nameko-devex
  • Deploy to CF via make
(nameko-devex) CF_APP=<prefix> make deployCF

If prefix is demo, the above command will:

  • Create the following free backing service instances

    • demo_rabbitmq for messaging
    • demo_postgres for postgres (Order service)
    • demo_redis for redis (Products service)
  • Push demo app with no-start option

  • Bind demo app to each backing service

  • Restage/restart demo app

  • Note: We can use manifest.yml for deployment without above step assuming the backing service is create prior

    • URL: demo.<CF_DOMAIN>

For multiple app deployment, uncomment appropriately in manifest.yml

  • Undeploy apps from CF
(nameko-devex) CF_APP=<PREFIX> make undeployCF <prefix>
  • Verifying app works in CF
(nameko-devex) test/nex-smoketest.sh <cf_url>

CI/CD

Using Cloudfoundry CLI is so straightforward that creating automation for development in dev or production environment is trivial from developer point of view