dsdb:replmd: add compatible feature helper function
[sfrench/samba-autobuild/.git] / bootstrap / READMD.md
1 # Samba Bootstrap
2
3 A pure python3 module with CLI to bootstrap Samba envs for multiple distributions.
4
5 ## Features
6
7 - manage Samba dependencies list for multiple distributions
8 - render dependencies package list to boostrap shell scripts(apt, yum and dnf)
9 - render Vagrantfile to provision vitual machines with bootstrap scripts
10 - render Dockerfile to build docker images with bootstrap scripts
11 - build/tag/push docker images
12
13 ## Supported Distributions
14
15 deb: Debian 7|8|9, Ubuntu 1404|1604|1804
16 rpm: CentOS 6|7, Fedora 28|29
17
18 Easy to add more.
19
20 ## Usage
21
22 Render files:
23
24     ./template.py --render
25
26 By default, files are rendered into `files` directory in current dir.
27
28 Build docker images:
29
30     ./docker.py --build
31
32 Tag docker images:
33
34     ./docker.py --tag --prefix registry.gitlab.com/samba-team/samba
35
36 Push docker images(you need to have permission):
37
38     docker login
39     ./docker.py --push --prefix registry.gitlab.com/samba-team/samba
40
41 the prefix defaults to `registry.gitlab.com/samba-team/samba`, and you can
42 override it with env var `SAMBA_DOCKER_IMAGE_NAME_PREFIX`.
43
44 ## User Stories
45
46 As a gitlab-ci maintainer, I can use this tool to build the CI docker images.
47 I can also automate it.
48
49 As a Samba developer/tester, I can setup a Samba env very quickly.
50
51 With Docker:
52
53     cd ~/samba
54     git clean -xdf
55     docker run -it -v $(pwd):/home/samba/samba samba-ubuntu1604:latest bash
56
57 With Vagrant:
58
59     cd ./files/
60     vagrant up   # start all
61     vagrant up debian9  # start one
62     vagrant ssh debian9
63     vagrant destroy debian9  # destroy one
64     vagrant destroy  # destroy all
65
66 Or a remote/cloud machine:
67
68     scp ./files/fedora29/bootstrap.sh USER@IP:
69     ssh USER@IP
70     sudo bash ./bootstrap.sh
71