Skip to content

ronniel1/bm-inventory

 
 

Repository files navigation

Actions Status

Actions Status

bm-inventory

  1. docker
  2. skipper https://github.com/stratoscale/skipper
  3. minikube (for tests)
  4. kubectl

First Setup

To push your build target to a docker registry you first need to change the default target.

  1. Create a quay.io or Docker Hub account if you don't already have one. These instructions refer to quay.io, Docker Hub is similar.
  2. Create a repository called bm-inventory
  3. Make sure you have your~/.docker/config.json file set up to point to your account. For quay.io, you can go to quay.io -> User Settings, and click "Generate Encrypted Password" under "Docker CLI Password".
  4. Login to quay.io using docker login quay.io
  5. Export the SERVICE environment variable to your docker registry, and pass a tag of your choice, e.g., "test":
export SERVICE=quay.io/<username>/bm-inventory:<tag>

Do the same for s3-object-expirer:

export OBJEXP=quay.io/<username>/s3-object-expirer:<tag>

For the first build of the build container run: skipper build bm-inventory-build

Build

skipper make all

Generate code after swagger changes

After every change in the api (swagger.yaml) the code should be generated and the build must pass

skipper make generate-from-swagger

Tests

Pre-configuration

  1. Run minikube on your system.
  2. Deploy service, DB and other requirements skipper make deploy-all
  3. Wait for all the pods to be up.

Running the tests:

skipper make subsystem-run

Update service for the subsystem tests

if you are making changes and don't want to deploy everything once again you can simple run this command

skipper make update && kubectl get pod --namespace assisted-installer -o name | grep bm-inventory | xargs kubectl delete --namespace assisted-installer

if will build and push a new image of the service to your docker registry, then delete the service pod from minikube, the deployment will handle the update and pull the new image to start the service again.

Deployment

The deployment is a system deployment, it contains all the components the service need for all the operations to work (if implemented). S3 service (scality), DB and will use the image generator to create the images in the deployed S3 and create relevant bucket in S3.

skipper make deploy-all

Troubleshooting

A document that can assist troubleshooting: link

Linked repositories

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 95.2%
  • Python 3.1%
  • Makefile 1.2%
  • HTML 0.5%