jailman move

This commit is contained in:
Kjeld Schouten-Lebbing
2023-03-16 09:54:20 +01:00
parent 1d32ed34c1
commit 92fa99d689
124 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,71 @@
# Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
Examples of unacceptable behavior by participants include:
* The use of sexual imagery and unwelcome sexual advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at jailman@schouten-lebbing.nl. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@ -0,0 +1,90 @@
# Contribution and Review Guidelines
This project welcomes any and all input, but we need to have a few quality guidelines. These guidelines will be examplained here, in this document.
### GIT Guidelines
***
#### New to GIT
If you have never used git before, you can look up our general reference on our wiki.
#### Git and You
GIT is a fantastic system, but while using it we have a few guidelines to keep it fantastic for everyone.
* Submit complete PR's.
* Add [DNM] if you do not want your PR merged yet.
* Always try and fill in the whole form, even for small PR's.
* Don't close when a reviewer requests changes (just push the changes or ask for help).
* Explain what you did in your PR.
* Be thorough.
* If you can add screenshots to clarify.
* Always try to add "Fixes #000" (where 000 is the Issue your PR fixes)
* found something you want to fix yourself? Please do make an issue too.
### Structure Guidelines
***
#### Naming scheme
File and folder names are important and making mistakes in them may give conflicts an/or annoyance in the future. Remember, your garbage needs to be cleaned by someone sometime in the future! For that reason, we have a few guidelines in regards to naming files and folder.
* Always start files and folders WITHOUT a Capital.
#### Inclusion of files and folders
Although GIT is quite friendly in what it accepts in terms of files and folder changes in a commit, a reviewer's or bugfixer's time is not unlimited. For that reason, we have a few specific guidelines in regards to the inclusion of files and folders in your PR.
* Only include files you actually changed.
* Try not to include multiple changes in one PR
* Want to change the formatting of multiple files too? Make a separate PR.
*Always include the following files when creating a new jail*
- install.sh
- update.sh
- readme.md
- config.yml
### Code Guidelines
***
#### Your code, your style, my review
Here at jailman, we value people having their own style. But your code needs to be reviewable and editable by others too. For that reason, we have a few basic coding guidelines
* **Always** explain regex in a comment within your code.
* Write simple code and don't try to impress.
* We will run (Basic) automated reformating of code once in a while.
* Document your changes in your code and if need be, on the wiki.
* All PR's should be able to pass our automated shellcheck.
* It's okey to add shellcheck ignores, but only AFTER you checked the warning!
#### jail requirements
- Jails should always save user-specific data in a persistant location. Which is the location specified in the config.yml file under "config:", which is automatically mounted to every jail under /config. There should be no user specific data in the jail itself
- Jails should not require the user to edit any config file themselves. All config changes should be automated
- Jails should not use default passwords, the user should always be forced(!) to put credentials in config.yml manually
### Review Guidelines
***
Even us review gods need some guidelines once in a while.
* Let people learn from their mistakes
* Review instead of merging without comments
* Abide by these guidelines in your review
* Tests exist for a reason. Don't merge with test-failures
### Todo vs Feature vs bug:
***
Please take note of the difference between a TODO and Feature
* Bug: An unexpected behavior of the script or a crash. Including, but not limited to, errors and warnings.
* Todo: When you come across something that needs tweaking/adding during development, is not an unexpected behavior
* Feature: When you, out of personal preference, want something added or changed.
### That's it!
***
Someone will come along and review the changes. If everything looks good then they will merge it with the main repo. If you need any help don't be afraid to ask in the discord channel: [https://discord.gg/tFcTpBp](https://discord.gg/tFcTpBp)

View File

@ -0,0 +1,5 @@
## General Info
Blueprints are the blueprint on which your created jails are going to be based.
More info TBD

View File

@ -0,0 +1,48 @@
## Config Options
There are a lot of possibly configuration options in config.yml.
For jail specific config options, please see the wiki documentation for your specific jail. This page only list general and global config options, that are the same for every jail.
## Global config options
Global options apply to every jail. Use and change with caution.
### dataset
All config options under "dataset" change dataset creation and linking. The indentation and "dataset" flag are not optional.
All Datasets are auto-created if they do not exist already, no need to worry about creating them!
- config: The dataset that is going to contain the persistant data for every jail. For example: Nextcloud user files for nextcloud or the actual database for mariadb.
- iocage: The dataset containing the iocage config. In FreeNAS often `poolname/iocage`
- media: The dataset that is going to contain all media files for plex, Sonarr, Radarr etc. Such as movies and music. Music, Movie etc. sub-datasets are auto-created.
- downloads: The dataset containging temporary download files. These are moved to media when finished. complete, incomplete etc. sub-datasets are auto-created.
## jails
All config options under "jails" change default jail settings that are the same for every created jail. The indentation and "jails" flag are not optional.
- version: the current to-be-installed version for jails
- pkgs: packages that are installed to all created jails
## (hidden) Auto created datasets
Some datasets are auto created and can not be changed from the config file. This is done to ease troubleshooting.
- `media/music` created as a sub-dataset of media, contains music
- `media/movies` created as a sub-dataset of media, contains movies
- `media/shows` created as a sub-dataset of media, contains tv-shows
- `downloads/complete` created as a sub-dataset of downloads, contains completed downloads
- `downloads/incomplete` created as a sub-dataset of downloads, contains not-yet-completed downloads
## General config options
### Networking
Please be aware that dhcp is not actively supported, many of the jails depend on having a fixed IP-adress in the config file.
Some also depend on other jails having a fixed IP in the config file. Use of DHCP is on your own risk and might not work.
- ip4_addr: To set a static IP (recommended), enter the desired ip address here. Leave blank (or remove the line) for DHCP.
- gateway: Set the gateway IP for static IP setup. Leave blank (or remove the line) for DHCP.
### Advanced
- interfaces: Set the "interfaces" flag for iocage. Example: `vnet0:bridge0` (optional)
- dhcp: Set to "on" to force DHCP (not required for DHCP, see above)
- pkgs: Override the to-be-install packages for this jail (might break now or break updates)

5
jailman/docs/index.md Normal file
View File

@ -0,0 +1,5 @@
# Introduction
Welcome to Jailam. An open source effort to create an easy management tool for Freenas Jails.
As this project is in its early stages, this wiki will serve the purpose of providing a foundation and a almost (not) up-to-date scripting reference to the underlying structure of jailman.

View File

@ -0,0 +1,61 @@
## v1.1.x to v1.2.x
With v1.2 we made it possible to run multiple jails of the same type.
This is done by seperating jails (your individual installs) from blueprints (our designs).
Due to this change, the config file has been changed and thus you need to adapt your config file.
### Jails
All your jails need to be indented by 2 spaces under a main group "jails" like this:
`
jail:
plex:
blueprint: plex
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
beta: false
`
Also note:
Where previously we used `plex: plex`, we can now just use `plex:`
### Blueprints
Every jail now requires a blueprint to be defined. for example:
v1.1.x
`
plex: plex
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
plexpass: false
`
In v1.2.x becomes:
`
jail:
plex:
blueprint: plex
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
beta: false
`
### Plex
Due to community feedback in v1.2.x "plexpass" has been renamed to "beta".
### pkgs
pkgs are removed from jail config in v1.2.x and are now part of the blueprint. This way we can keep them up-to-date for you.
### Documentation
All jails now have wiki documentation pages and all basic jail values have been documented
### Other changes
Some other minor changes in config file values have been done, please refer to the example document and compare your config to the example