2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-22 10:10:12 +00:00
Emerle, Ryan e1743e5342
Updates
- Simplify build config
- Add TTY check to Makefiles for running Docker containers
- Update `fs2` to latest patch
- Update `sbt-assembly` plugin
- Update portal to remove chatty console
- Update portal scripts to add license header
- Update prepare-portal/Gruntfile to combine js and css where applicable
- Remove unused gentelella files from final portal artifact
- Add support for shared zones to quickstart/docker images
- Consolidate built artifacts in `artifacts/` to make eventual release easier
2021-11-02 17:06:24 -04:00
..
2021-11-02 17:06:24 -04:00
2021-11-02 17:06:24 -04:00
2021-11-01 12:25:17 -04:00
2021-11-02 17:06:24 -04:00

Building VinylDNS

This folder contains scripts and everything you need to build and test VinylDNS from your own machine.

Pre-requisites

  • docker - you will need docker and docker-compose installed locally

Local Build and Test

  1. ./docker-release.sh --clean
  2. Open up version.sbt in the root to know the directory (or capture in the script output)
  3. Once complete, run a test ./start.sh --version 0.9.4-SNAPSHOT (replace 0.9.4 with the value in version.sbt).
  4. Login to the portal at http://localhost:9001 to verify everything looks good
  5. Run ./stop.sh to bring everything down

Release Process

  1. If you are using image signing / docker notary, be sure you set the environment variable export DOCKER_CONTENT_TRUST=1.
    Whether you sign or not is up to your organization. You need to have notary setup to be able to sign properly.
  2. Be sure to login to your docker registry, typically done by docker login in the terminal you will release from.
  3. The actual version number is pulled from the local version.sbt based on the branch specified (defaults to master)
  4. Run ./docker-release.sh --push --clean --tag [your tag here] --branch [your branch here]
    1. typically the tag is a build number that you maintain, for example a build number in Jenkins. Using this field is recommended. This value will be appended to the generated version as -b[TAG]; for example 0.9.4-b123 if using 123 for the tag.
    2. the branch defaults to master if not specified, you can choose any branch or tag from https://github.com/vinyldns/vinyldns
  5. The version generated will be whatever the version is in the version.sbt on the branch specified (defaults to master)
  6. Each of the images are built using the branch specified and the correct version
  7. The func tests are run with only smoke tests against the API image to verify it is working
  8. If everything passes, and the user specifies --push, the images are tagged and released to the docker repository (defaults to docker hub)

Release Script

Does a clean build off of remote master and tags it with ./docker-release.sh --clean --push --tag 123

The release script is used for doing a release. It takes the following parameters:

  • -b | --branch [BRANCH] - what branch to pull from, can be any PR branch or a tag like v0.9.3, defaults to master
  • -c | --clean - a flag that indicates to perform a build. If omitted, the release script will look for a pre-built image locally
  • -p | --push - a flag that indicates to push to the remote docker registry. The default docker registry is docker.io
  • -r | --repository [REPOSITORY] - a URL to your docker registry, defaults to docker.io
  • -t | --tag [TAG] - a build qualifer for this build. For example, pass in the build number for your continuous integration tool
  • -v | --version [VERSION] - overrides the version calculation and forces the version passed in. Used primarily for official releases

Docker Images

The build will generate several VinylDNS docker images that are used to deploy into any environment VinylDNS

  • vinyldns/api - this is the heart of the VinylDNS system, the backend API
  • vinyldns/portal - the VinylDNS web UI

vinyldns/api

The default build for vinyldns api assumes an ALL MYSQL installation.

Environment Variables

  • VINYLDNS_VERSION - this is the version of VinylDNS the API is running, typically you will not set this as it is set as part of the container build

Volumes

  • /opt/vinyldns/conf/ - if you need to have your own application config file. This is MANDATORY for any production environments. Typically, you will add your own application.conf file in here with your settings.
  • /opt/vinyldns/lib_extra/ - if you need to have additional jar files available to your VinylDNS instance. Rarely used, but if you want to bring your own message queue or database you can put the jar files there

vinyldns/portal

The default build for vinyldns portal assumes an ALL MYSQL installation.

Environment Variables

  • VINYLDNS_VERSION - this is the version of VinylDNS the API is running, typically you will not set this as it is set as part of the container build

Volumes

  • /opt/vinyldns/conf/ - if you need to have your own application config file. This is MANDATORY for any production environments. Typically, you will add your own application.conf file in here with your settings.
  • /opt/vinyldns/lib_extra/ - if you need to have additional jar files available to your VinylDNS instance. Rarely used, but if you want to bring your own message queue or database you can put the jar files there