- docker
- skipper https://github.com/stratoscale/skipper
- minikube (for tests)
- kubectl
To push your build target to a docker registry you first need to change the default target.
- 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.
- Create a repository called bm-inventory
- 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".
- Login to quay.io using
docker login quay.io
- 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
skipper make all
After every change in the api (swagger.yaml) the code should be generated and the build must pass
skipper make generate-from-swagger
Pre-configuration
- Run minikube on your system.
- Deploy service, DB and other requirements
skipper make deploy-all
- Wait for all the pods to be up.
Running the tests:
skipper make subsystem-run
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.
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
A document that can assist troubleshooting: link
-
https://github.com/oshercc/coreos_installation_iso
Image in charge of generating the Fedora-coreOs image used to install the host with the relevant ignition file
Image is uploaded to deployed S3 under the name template "installer-image-"
-
https://github.com/oshercc/ignition-manifests-and-kubeconfig-generate
Image in charge of generating the fallowing installation files:
- kubeconfig
- bootstrap.ign
- master.ign
- worker.ign
- metadata.json
- kubeadmin-password
Files are uploaded to deployed S3 under the name template "/"