dcos / dcos
- четверг, 21 апреля 2016 г. в 03:13:13
Python
DC/OS Build and Release tools
Tools for building DC/OS and launching a cluster with it in the hardware of a customer's choice.
All code in this repository is Python 3
tar
needs to be GNU tar for the set of flags useddocker run alpine /bin/echo 'Hello, World!'
when run at a new terminal as your user should just print "Hello, World!"
. If it says something like "Unable to find image 'alpine:latest' locally" then re-run and the message should go away.sudo pacman -S python
sudo dnf install pxz
Get the code, move into the repository
$ git clone https://github.com/dcos/dcos.git
$ cd dcos
Write a configuration file for the release tool. We're going to use a local folder $HOME/dcos-artifacts as a repository for all of the DCOS build artifacts for development / testing. Amazon Web Services S3 and Azure Blob Storage can also both be used. The storage providers are all defined in release/storage/
. config/dcos-release.config.yaml has the configuration used for the CI that pushes to downloads.dcos.io.
$ cat <<EOF > dcos-release.config.yaml
storage:
local:
kind: local_path
path: $HOME/dcos-artifacts
options:
preferred: local
EOF
Setup a python virtual environment, and then use release
tool to build / release DCOS and publish it into the storage locations in the configuration file.
$ pyvenv ../env
$ source ../env/bin/activate
# Install the release tools, pkgpanda, etc to the virtualenvironment
$ ./prep_local
# NOTE: prep_local doses a "editable" pip install, so most local code changes
# will be visible immediately in `release`, `pkgpanda`, `mkpanda` and the other
# python tools in the repository.
# Create the release release, have it published according to your conifg to the
# channel `testing/first` with a tag `build-demo`
# NOTE: Building a release from scratch the first time on a modern dev machine
# (4 cores / 8 hyper threads, SSD, reasonable interent bandwidth) takes about
# 1 hour.
$ release create first build-demo
# NOTE: release create's first argument is the channel to push two, and the
# second is a tag. The channel could be something like your username, or
#"master". it will make the build appear at
# <storage-path>/testing/<channel-name>/. The tag is an arbitrary identifier to
# denote what the build contains and help track a particular build / feature
# across channels.
# NOTE: Most errors / problems result in Python exceptions + stacktraces. This
# is expected. Usually if you look just above the python exception you'll get a
# more human error message which was the root cause.
# Run the newly built web installer
$ $HOME/dcos-artifacts/testing/first/dcos_generate_config.sh --web
$ tox
Lots of docs are still being written. If you have immediate questions please ask the DC/OS Community. Someone else probably has exactly the same question.