OtterDog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively used by the Eclipse Foundation to manage its numerous projects hosted on GitHub.
See the code
Otterdog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively developed by the Eclipse Foundation and used to manage its numerous projects hosted on GitHub.
To install and use the cli part of otterdog you have to install the following:
apt install gitpipx install otterdogsnap install bwapt install passOtterdog Presentation @ Open Source Summit 2023
Default Configuration used @ Eclipse Foundation
The documentation is available at otterdog.readthedocs.io.
apt install python3 or use pyenv install 3.12apt install gitpipx install poetry>=2.0.1snap install bwapt install pass$ make init
Running make init will also install poetry if it is not installed yet.
$ ./otterdog.sh -h
To start using the cli part of otterdog right away on a specific organization you have to set up the following:
otterdog.json file that contains a list of GitHub organizations to manager and their respective credentialsThe example default config has all supported features enabled and can be used right away.
However, it is advised to use a released tag instead of main to avoid incompatibilities.
Create a otterdog.jsonnet or otterdog.json file with the following content (replace bracketed values according to your setup):
{
"defaults": {
"jsonnet": {
"base_template": "https://github.com/eclipse-csi/otterdog#examples/template/otterdog-defaults.libsonnet@main",
"config_dir": "orgs"
}
},
"organizations": [
{
"name": "<project-name>",
"github_id": "<github-id>",
"credentials": {
"provider": "plain",
"api_token": "<GitHub PAT>",
"username": "<Username>",
"password": "<Password>",
"twofa_seed": "<2FA TOTP seed>"
}
}
]
}
The name of the configuration file can be freely chosen (can be overridden with the -c flag).
However, when named otterdog.jsonnet or otterdog.json, the cli tool will automatically detect and use that file if it is in the current working directory.
[!IMPORTANT] In this example the
plainprovider is being used to access credentials to avoid setting up arealcredential provider (see below) for a quick setup. However, theplainprovider should NOT be used for anything else to avoid leakage of data in case theotterdog.jsonfile is shared with other users.
The OTTERDOG_CONFIG_ROOT environment variable allows you to specify a custom root directory for Otterdog configuration files and organization data. E.g: https://github.com/EclipseFdn/otterdog-configs
When set, Otterdog will:
otterdog.jsonnet or otterdog.json) in this directoryconfig_dir (default: orgs/) containing organization configurationsUsage:
# Set the configuration root directory
export OTTERDOG_CONFIG_ROOT=/path/to/config
# Run otterdog commands - will automatically use the specified directory
otterdog fetch-config eclipse-csi
otterdog apply eclipse-csi
Otterdog needs certain credentials to access information from an organization and its repositories on GitHub:
The login / username / 2FA seed are required to access the web interface of GitHub in order to retrieve certain settings that are not accessible via its rest / graphql API.
The GitHub api token needs to have the following scopes enabled:
The credentials can be stored in different providers (bitwarden, pass).
When using bitwarden to store the credentials, you need to enter a valid item id as additional credential data:
{
"organizations": [
{
"name": "<org name>",
"github_id": "<github org id>",
"credentials": {
"provider": "bitwarden",
"item_id" : "<bitwarden item id>"
}
}
]
}
The item stored in bitwarden needs to contain the following information (a sample json output of such an item):
{
"object": "item",
"id": "<bitwarden item id>",
"name": "<item name>",
"fields": [
{
"name": "api_token_admin",
"value": "<github API token>"
}
],
"login": {
"username": "<github username>",
"password": "<github password>",
"totp": "<2FA TOTP seed>"
}
}
Mandatory items:
When using pass to store the credentials, you need to enter fully qualified pass names to access the various required credential data:
{
"organizations": [
{
"name": "<org name>",
"github_id": "<github org id>",
"credentials": {
"provider": "pass",
"api_token": "<path/to/api_token>",
"username": "<path/to/username>",
"password": "<path/to/password>",
"twofa_seed": "<path/to/2fa_seed>"
}
}
]
}
In case your password storage dir is not located at the default location, you can
configurate that in the defaults:
{
"defaults": {
"pass": {
"password_store_dir": "path/to/storage/dir"
}
}
}
As the password_store_dir might be different on different machines, you can also customize that in a separate .otterdog-defaults.json file:
{
"pass": {
"password_store_dir": "path/to/storage/dir"
}
}
Python
87.1%
HTML
11.5%
OtterDog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively used by the Eclipse Foundation to manage its numerous projects hosted on GitHub.
See the code
Otterdog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively developed by the Eclipse Foundation and used to manage its numerous projects hosted on GitHub.
To install and use the cli part of otterdog you have to install the following:
apt install gitpipx install otterdogsnap install bwapt install passOtterdog Presentation @ Open Source Summit 2023
Default Configuration used @ Eclipse Foundation
The documentation is available at otterdog.readthedocs.io.
apt install python3 or use pyenv install 3.12apt install gitpipx install poetry>=2.0.1snap install bwapt install pass$ make init
Running make init will also install poetry if it is not installed yet.
$ ./otterdog.sh -h
To start using the cli part of otterdog right away on a specific organization you have to set up the following:
otterdog.json file that contains a list of GitHub organizations to manager and their respective credentialsThe example default config has all supported features enabled and can be used right away.
However, it is advised to use a released tag instead of main to avoid incompatibilities.
Create a otterdog.jsonnet or otterdog.json file with the following content (replace bracketed values according to your setup):
{
"defaults": {
"jsonnet": {
"base_template": "https://github.com/eclipse-csi/otterdog#examples/template/otterdog-defaults.libsonnet@main",
"config_dir": "orgs"
}
},
"organizations": [
{
"name": "<project-name>",
"github_id": "<github-id>",
"credentials": {
"provider": "plain",
"api_token": "<GitHub PAT>",
"username": "<Username>",
"password": "<Password>",
"twofa_seed": "<2FA TOTP seed>"
}
}
]
}
The name of the configuration file can be freely chosen (can be overridden with the -c flag).
However, when named otterdog.jsonnet or otterdog.json, the cli tool will automatically detect and use that file if it is in the current working directory.
[!IMPORTANT] In this example the
plainprovider is being used to access credentials to avoid setting up arealcredential provider (see below) for a quick setup. However, theplainprovider should NOT be used for anything else to avoid leakage of data in case theotterdog.jsonfile is shared with other users.
The OTTERDOG_CONFIG_ROOT environment variable allows you to specify a custom root directory for Otterdog configuration files and organization data. E.g: https://github.com/EclipseFdn/otterdog-configs
When set, Otterdog will:
otterdog.jsonnet or otterdog.json) in this directoryconfig_dir (default: orgs/) containing organization configurationsUsage:
# Set the configuration root directory
export OTTERDOG_CONFIG_ROOT=/path/to/config
# Run otterdog commands - will automatically use the specified directory
otterdog fetch-config eclipse-csi
otterdog apply eclipse-csi
Otterdog needs certain credentials to access information from an organization and its repositories on GitHub:
The login / username / 2FA seed are required to access the web interface of GitHub in order to retrieve certain settings that are not accessible via its rest / graphql API.
The GitHub api token needs to have the following scopes enabled:
The credentials can be stored in different providers (bitwarden, pass).
When using bitwarden to store the credentials, you need to enter a valid item id as additional credential data:
{
"organizations": [
{
"name": "<org name>",
"github_id": "<github org id>",
"credentials": {
"provider": "bitwarden",
"item_id" : "<bitwarden item id>"
}
}
]
}
The item stored in bitwarden needs to contain the following information (a sample json output of such an item):
{
"object": "item",
"id": "<bitwarden item id>",
"name": "<item name>",
"fields": [
{
"name": "api_token_admin",
"value": "<github API token>"
}
],
"login": {
"username": "<github username>",
"password": "<github password>",
"totp": "<2FA TOTP seed>"
}
}
Mandatory items:
When using pass to store the credentials, you need to enter fully qualified pass names to access the various required credential data:
{
"organizations": [
{
"name": "<org name>",
"github_id": "<github org id>",
"credentials": {
"provider": "pass",
"api_token": "<path/to/api_token>",
"username": "<path/to/username>",
"password": "<path/to/password>",
"twofa_seed": "<path/to/2fa_seed>"
}
}
]
}
In case your password storage dir is not located at the default location, you can
configurate that in the defaults:
{
"defaults": {
"pass": {
"password_store_dir": "path/to/storage/dir"
}
}
}
As the password_store_dir might be different on different machines, you can also customize that in a separate .otterdog-defaults.json file:
{
"pass": {
"password_store_dir": "path/to/storage/dir"
}
}
Python
87.1%
HTML
11.5%