Skip to content

Commit 8147b81

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
readme: update readme to reflect recent changes
Signed-off-by: John Mulligan <[email protected]>
1 parent e7850e0 commit 8147b81

File tree

1 file changed

+62
-29
lines changed

1 file changed

+62
-29
lines changed

README.md

Lines changed: 62 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,28 @@
22

33
## About
44

5-
The sambacc is an young project that aims to consolidate and coordinate
6-
configuration of [Samba](http://samba.org), and related components, when
7-
running in a container. The configuration of one or many instances can be
8-
provided to the tool by way of a JSON file which then handles the low level
9-
details of actually configuring smbd and other elements in the container
5+
The sambacc project aims to consolidate and coordinate configuration of
6+
[Samba](http://samba.org), and related components, when running in a
7+
container. The configuration of one or many server instances can be
8+
managed by the tool with the use of configuration files. These
9+
configuration files act as a superset of the well-known smb.conf, to
10+
configure Samba, as well as other low level details of the container
1011
environment.
1112

1213

1314
## Rationale
1415

15-
Samba is a powerful and unique tool for implementing the SMB protocol and a
16-
software stack to support it on unix-like systems. However, it's potentially
17-
challenging to set up and manage many instances of Samba by-hand, especially
18-
when running under a container orchestration system.
16+
Samba is a powerful and unique tool for implementing the SMB protocol and
17+
a software stack to support it on unix-like systems. However, it's
18+
potentially challenging to set up and manage many instances of Samba
19+
by-hand, especially when running under a container orchestration system.
1920

20-
The idea behind sambacc is mainly to automate all of the low level steps of
21-
setting up smbd, users, groups, and other supporting components. The tool is
22-
also designed to consume one "site-wide" configuration file that can be
23-
maintained across many container instances. sambacc is written in Python as
24-
samba provides Python bindings for some of the aspects of samba we need to
25-
control.
21+
The idea behind sambacc is to automate much of the low level steps needed
22+
to set up samba daemons, users, groups, and other supporting
23+
components. The tool is also designed to consume configuration files that
24+
can be used across many container instances. sambacc is written in Python
25+
as samba provides Python bindings for some of the aspects of samba we need
26+
to control.
2627

2728
The sambacc library and samba-container CLI command are used by the
2829
[samba-container project](https://github.com/samba-in-kubernetes/samba-container/)
@@ -74,8 +75,8 @@ samba-dc-container --help
7475
## Features
7576

7677
* Abstracts away some of the nitty-gritty details about what Samba expects
77-
in it's environment
78-
* Imports specific smb.conf settings from "site wide" JSON configuration.
78+
in its environment
79+
* Imports specific smb.conf settings from "site wide" configuration files.
7980
* Imports users and groups
8081
* Starts smbd with container friendly settings
8182
* Starts winbindd with container friendly settings
@@ -91,10 +92,25 @@ A lot. Various things that are missing include:
9192
* Better integration (as opposed to unit) testing
9293
* Better use of APIs versus executing CLI commands
9394

95+
Contributions and feedback would be very much appreciated.
96+
9497

9598
## Install
9699

97-
Currently the only method of install is from source control.
100+
The sambacc library, samba-container command, and samba-dc-container are
101+
written assuming the software is being run within an OCI container environment.
102+
While there's nothing stopping you from trying to install it on something else
103+
the value of doing that will be rather limited.
104+
105+
The (samba-container
106+
project)[https://github.com/samba-in-kubernetes/samba-container] includes
107+
sambacc and samba packages. If you are looking to use sambacc and not
108+
contribute to it, that's probably what you want.
109+
110+
Builds of sambacc are continuously produced within our (COPR repository)[https://copr.fedorainfracloud.org/coprs/phlogistonjohn/sambacc/].
111+
These builds are then consumed by the container image builds.
112+
113+
Otherwise, the only method of install is from source control.
98114

99115
* Clone the repo: `git clone https://github.com/samba-in-kubernetes/sambacc`
100116
* `cd sambacc`
@@ -110,20 +126,33 @@ wheels. Then you can distribute and install from the wheel if you need to.
110126
To run the entire unit test suite locally install `tox` and run `tox` in
111127
the repo root.
112128

113-
Because of the library and tooling that interacts with samba has some system level dependencies, not all test can be run locally.
129+
Because of the library and tooling that interacts with samba has some
130+
system level dependencies, not all tests can be run locally in
131+
isolated (virtualenv) environments.
114132

115-
#### Containerized testing
116133

117-
In addition to running the unit tests locally, I've created a container image
118-
for testing and building sambacc. It lives at ./tests/container. This is
119-
canonical way to run the test suite and is what is used by the CI tests. When
120-
run this way certain system packages can be installed, etc. to support
121-
running a wider range of test cases.
134+
#### Containerized testing
122135

123-
To produce builds using the container, mount a directory into the container at
124-
"/srv/dist" and set the environment variable `SAMBACC_DISTNAME` to a term of
125-
your choice (example: "latest"). This will then save the builds in a dir of
126-
that name in your output dir. Example:
136+
A more robust and isolated testing environment is provided in
137+
the form of the sambacc container image.
138+
139+
The container file and other sources are available at ./tests/container in
140+
the sambacc repo. This is the canonical way to run the test suite and is
141+
what is used by the CI tests. When run this way certain system packages
142+
can be installed, etc. to support running a wider range of test cases.
143+
144+
By default the container image is configured to check out sambacc master
145+
branch and execute the tests and build python source distributions,
146+
wheels, and RPM packages. You can test your local git checkout using the
147+
image by mounting it at /var/tmp/build/sambacc (example: `podman run -v
148+
$PWD:/var/tmp/build/sambacc sambacc:ci`).
149+
150+
To access the packages that are built using the container, mount a
151+
directory into the container at "/srv/dist" and set the environment
152+
variable `SAMBACC_DISTNAME` to a term of your choice (example: "latest").
153+
This will then save the builds in a directory of that name in your output
154+
directory.
155+
Example:
127156
```
128157
$ mkdir -p $HOME/tmp/sambacc
129158
$ podman run --rm \
@@ -136,6 +165,10 @@ sambacc-0.1.dev225+g10059ff-py3-none-any.whl sha512sums
136165
sambacc-0.1.dev225+g10059ff.tar.gz
137166
```
138167

168+
You can combine the source directory mount and distribution directory
169+
mount in one command to produce builds for your own local development work
170+
if needed.
171+
139172
## License
140173

141174
GPLv3 as per the COPYING file.

0 commit comments

Comments
 (0)