All-in-one package » History » Version 1
Tom Clegg, 08/07/2020 03:29 PM
1 | 1 | Tom Clegg | h1. All-in-one package |
---|---|---|---|
2 | |||
3 | (draft / work in progress, see #16306 and "arvados-server boot (google doc)":https://docs.google.com/document/d/1UvABO9WOg5svK2LIETaEgg9jZQp6Lydb47HrG3NMsFM/edit) |
||
4 | |||
5 | "arvados-server-easy" is a debian/rpm package that can be used to create a single-node production cluster from scratch with minimal effort: |
||
6 | |||
7 | <pre> |
||
8 | apt-get install arvados-server-easy |
||
9 | arvados-server init -cluster-id x1234 |
||
10 | systemctl start arvados |
||
11 | </pre> |
||
12 | |||
13 | This page is mostly about how we build/maintain the package, rather than how to use it. |
||
14 | |||
15 | h2. Building |
||
16 | |||
17 | source:cmd/arvados-dev (similar to arvados-client/server) has: |
||
18 | * a "buildpackage" subcommand that creates a deb/rpm package from source (i.e., a checkout of the arvados source tree, possibly with local modifications). It takes care of installing dependencies, fpm, etc. |
||
19 | * a bash script (could move to Go) that builds a package for a given OS version by injecting the buildpackage command into a docker container with that OS version, installs the resulting package into a new base OS image, and saves the resulting image for testing purposes. (currently, debian:10 is implemented) |
||
20 | * a bash script (could move to Go) that brings up a cluster using the testing image (the one with arvados-server-easy already installed), optionally injecting local changes to enable a quicker dev cycle. For example, "docker-boot.sh cmd/arvados-server" builds a new arvados-server binary on the host, then starts a container using the test image but with the new arvados-server binary bind-mounted over the packaged one. |
||
21 | |||
22 | Package publishing outline (pseudocode): |
||
23 | <pre> |
||
24 | ./cmd/arvados-dev/docker-build-install.sh -os debian:10 |
||
25 | </pre> |
||
26 | |||
27 | Development cycle: |
||
28 | <pre> |
||
29 | ./cmd/arvados-dev/docker-build-install.sh -os debian:10 # (just once, takes 10+ minutes) |
||
30 | ./cmd/arvados-dev/docker-boot.sh |
||
31 | # (edit some Go code locally) |
||
32 | ./cmd/arvados-dev/docker-boot.sh cmd/arvados-server # takes 15 seconds, mostly starting postgresql, creating db, etc |
||
33 | # (edit some Go code locally) |
||
34 | ./cmd/arvados-dev/docker-boot.sh cmd/arvados-server |
||
35 | # ... |
||
36 | </pre> |