Commit Graph

13 Commits

Author SHA1 Message Date
Ahmad Mahmoudi 2a02bc9b3f Add support for ubuntu bionic base image
Adds support to build drydock image using either a xenial or a bionic base
image. Currently only xenial base is supported.
The default base image is set to ubuntu bionic.

Change-Id: I93672cf35879d8525d28e870ea83e5512c1043f9
2020-01-17 11:38:56 -06:00
Ahmad Mahmoudi 54675558fd Update image build script to run in a docker
Updated Makefile to run the build baclient package for go on the
host instead of as a docker container, to allow the Makefile be
called from another container. Reason being, in a docker-in-docker,
volume mapping requires knowledge of host filesystem path instead
of the docker daemon filesystem path.

Corrected proxy configuration in the scripts to use the USE_PROXY,
PROXY and NO_PROXY environment variables.

Updated Dockerfile to add multi-stage build, to avoid including the
golang-go package in the docker image. Stage one creates the
baclient Go library, and stage two creates the drydock image, and
copies the baclient from stage one image.

Change-Id: I29a30e870da8f44279dcd62bb1173165fa939d43
2020-01-14 17:39:27 -06:00
Roman Gorshunov 161326fe06 Fix: Drydock Exceptions docs rendering on RTD
Readthedocs failed to render Drydock exceptions with error:
> WARNING: autodoc: failed to import exception xxx from module
> 'drydock_provisioner'; the following exception was raised: No module
> named 'drydock_provisioner'

Trying to add Drydock requirements to the installed requirements list,
so that Readthedocs has all modules, including those needed for the
Drydock itself.

Unify docs building by utilizing Zuul docs-on-readthedocs template job.

Cosmetic readability changes:
1. combined all Makefile .PHONY targets into one
2. merged multiple LABEL instructions in Dockerfile into one

Change-Id: I6a9b47cffc66d739968fa886c51e25b1e09ef124
2019-08-27 22:56:32 +02:00
Drew Walters ac997fd6ec images: Allow base image substitution for Drydock
Currently, Drydock images are built using the Ubuntu:16.04 base image.
This change allows users to specify different base images using the
UBUNTU_BASE_IMAGE build argument.

Change-Id: I9ddaa89eb5262571703a3dbf7ebb6deed1505842
2019-03-07 12:09:52 -06:00
Zuul 9625febab6 Merge "Fix: git commit id labels on images" 2018-10-03 00:14:27 +00:00
Roman Gorshunov 34f7d760e8 Fix: git commit id labels on images
1) Use OCI Image Specs for labels instead of custom 'commit-id=xxxxx'
   or legacy "Label Schema"
2) Fix missing git commit id labels on images (.revision)
3) Add human-readable title (.title) of the image, URL (.url), and
   a few other properties (annotations) according to the latest Specs

Change-Id: I78ae651cdcba69e3a9a7a27bafa9a3a13c8eb557
2018-09-21 03:31:12 +02:00
Scott Hussey 472fc0f232 (critical-fix) Fix Dockerfile entrypoint.sh
Dockerfile changes to support Go broke the resulting image by
omitting entrypoint.sh. This updates the Dockerfile to include
entrypoint.sh and set working directory correctly.

- Add the 'run_drydock' make target to the omni test so that
  the Dockerfile image build is gated

Change-Id: I4c3ee7fd3acb037940e17997b47fff94e0e7fc6f
2018-09-14 11:45:09 -05:00
Scott Hussey 9a52dca199 Bootaction cleanup
- Clean up the docs and code around bootactions to support the
  baclient work

- Update the Jinja2 environment in the bootaction rendering
- Refactor authentication of bootaction signal API calls

Change-Id: Ic64f0c7ee09a487be750188953013f1ed3cd99cb
2018-09-06 16:33:11 -05:00
Scott Hussey 0f39a55942 Refactor build to include Go
Adding the baclient code to Drydock requires a refactor
of the build automation to support multiple languages
and multiple artifacts included in a single Docker image

NOTE: the go source here is a placeholder 'hello world' sample

Change-Id: I1b4883f018b33b3d4fcd7cbcb6cba660fcdc93de
2018-09-04 13:13:21 -05:00
Scott Hussey 812cef9335 (zuul) Improve image building
Improve image building to get closer to
support zuul package mirrors

Change-Id: I57285b242ddc50e8e902ad2820982a2d4b351bc3
2018-08-10 21:09:50 +00:00
Scott Hussey dbad75775b Libvirt OOB driver
- Create a driver to support OOB actions via libvirt API
- Update Makefile with external dependency target
- Update Makefile and tooling to support new chart pipeline
   - Add 'drydock' make target for chart building
   - Add step to install helm binary

Change-Id: I8a3984d8fd70f99a82a954b7a869eab8e30145b4
2018-05-25 11:13:53 -05:00
Scott Hussey a71c4be911 [Fix] Adhere to UCP spec for validation status
- The spec calls it out capitalized strings
- Remove pip cache from Dockerfile build

Change-Id: I4c8907120ba0213936060d9f0b463fc5e0bcf7db
2018-03-23 10:31:27 -05:00
Scott Hussey ae87cd1714 Update image and chart mgmt
NOTE: This has become a monolithic commit to get gate
      settings/scripts in place for CI

- Add Makefile with UCP standard entrypoints
- Move Dockerfile into images/drydock per UCP standards
- Add values.yaml entries for uWSGI threads and workers
- Add environment variables to chart Deployment manifest
  for uWSGI thread and workers
- Add threads and workers specification to uWSGI commandline
  in entrypoint
- Test that the Drydock API is responding
- Test that the Drydock API rejects noauth requests
- Fix Makefile utility script to work behind a proxy

Correct task success voting

Some tasks were incorrectly considered partial_success even when
no failure occurred.

- Network configuration erroneously marked messages as errors
- Update result propagation logic to only use the latest retry

The deploy_nodes task ended as incomplete due to a missing
subtask assignment

Also added a node check step to prepare_nodes so that nodes that
are already under provisioner control (MaaS) are not IPMI-rebooted.

Tangential changes:
- added config item to for leadership claim interval
- added some debug logging to bootaction_report task
- fix tasks list API endpoint to generate valid JSON

Improve task concurrency

When tasks are started with a scope of multiple nodes,
split the main task so each node is managed independently
to de-link the progression of nodes.

- Split the prepare_nodes task
- Begin reducing cyclomatic complexity to allow for
  better unit testing
- Improved tox testing to include coverage by default
- Include postgresql integration tests in coverage

Closes #73

Change-Id: I600c2a4db74dd42e809bc3ee499fb945ebdf31f6
2017-12-15 15:33:14 -06:00