This repository contains configuration files for orchestrating the building and deployment of the welder tool. Currently this consists of:
- Building the metadata import tool.
- Using the tool to import a set of rpms and create a metadata.db
- Create a storage container for recipes
- Launch the bdcs-api container, connected to the metadata.db and recipe storage.
- Launch the welder-web container, with the
API_URL
set to point to the bdcs-api image.
We use docker-composer to manage this.
- Access to the
https://github.com/weldr
git repositories. - A directory of rpm files to import into the bdcs metadata database
- or a pre-built metadata.db file
make build
mkdir ./rpms
sudo mount -o bind /PATH/TO/RPMS/ ./rpms/
make import
make run
You should have a welder instance running on port 80 of your system with the API accessable under /api/...
If you want to run it on a port other than 80, edit the docker-compose.yml
file and change the 80:3000 to something else, like 8000:3000 and rerun make run
If you don't have a directory of rpms to import you can use the prebuilt metadata.db generated by Jenkins. Download it from Jenkins.
make build
- Copy the downloaded
metadata.db
file to the current directory. make import-metadata
make run
The makefile provides several useful targets and some directory setup to make this easier. Starting from a new repository clone you can get to a copy of the welder application running on port 80 by doing the following:
make build
to use github ormake build-local
to use the current branch on local repos.- Symlink a repository of rpms to import to
./rpms/
or exportIMPORT_PATH
make import
will import the rpms into themetadata.db
file inside thebdcs-mddb-volume
make run
will run the api container, attached to the mddb container, and the welder-web container connected to port 80.
make build
will checkout the latest version of bdcs, bdcs-api and
welder-web from github and rebuild the weld/*
images. ssh access to github
must be setup for this to work.
Alternatively, if the projects already exist at ../bdcs, ../bdcs-api,
../welder-web, you can use make build-local
and those repos will be cloned
and used for the build. The current branch is used, so this can be useful for
development before pushing to github. Note that these are checkouts so
uncomitted changes won't be used.
make import
will import the rpms from ./rpms/ into the metadata.db stored in
the bdcs-mddb-volume
. You can point to a different path for the rpms by
setting the IMPORT_PATH
variable when running make import
or by symlinking
the path to the rpms to ./rpms/
This step expects ./bdcs/ to have been previously cloned -- it uses the Makefile from it.
make run
will launch the weld/bdcs-api
image with the bdcs-mddb-volume
attached to it, and the welder-web
module with the http server
running on port 80.
make clean
will remove the checkout directories.
make local-repos
will make sure that the local repos are used for the images.
This configuration is used for building the bdcs-api and welder-web images, as
well as for running them. It is setup to attach to port 80 on the host. If
another port needs to be used, edit the file to change it in the web
section's ports
settings.
building the images with this configuration requires some setup, see the Makefile section for details.
The bdcs-recipes-volume
is created the first time this is run, and will
persist between uses of docker-compose or docker. At runtime it will copy the
example recipe into it.