selftest: Woraround uid wrapper issues when using bash shell
[Samba.git] / bootstrap / READMD.md
blob313c2056007fdf20175c4a32c0fff876f645a9ef
1 # Samba Bootstrap
3 A pure python3 module with CLI to bootstrap Samba envs for multiple distributions.
5 ## Features
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
13 ## Supported Distributions
15 deb: Debian 7|8|9, Ubuntu 1404|1604|1804
16 rpm: CentOS 6|7, Fedora 28|29
18 Easy to add more.
20 ## Usage
22 Render files:
24     ./template.py --render
26 By default, files are rendered into `files` directory in current dir.
28 Build docker images:
30     ./docker.py --build
32 Tag docker images:
34     ./docker.py --tag --prefix registry.gitlab.com/samba-team/samba
36 Push docker images(you need to have permission):
38     docker login
39     ./docker.py --push --prefix registry.gitlab.com/samba-team/samba
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`.
44 ## User Stories
46 As a gitlab-ci maintainer, I can use this tool to build the CI docker images.
47 I can also automate it.
49 As a Samba developer/tester, I can setup a Samba env very quickly.
51 With Docker:
53     cd ~/samba
54     git clean -xdf
55     docker run -it -v $(pwd):/home/samba/samba samba-ubuntu1604:latest bash
57 With Vagrant:
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
66 Or a remote/cloud machine:
68     scp ./files/fedora29/bootstrap.sh USER@IP:
69     ssh USER@IP
70     sudo bash ./bootstrap.sh