1- # Wadsworth
1+ # Picobot
22
3- _ The [ Mister Handy robot] [ wadsworth ] of automation!_
3+ _ The little git robot of automation!_
44
5- [ ![ Build Status] ( https://travis-ci.org/Southclaws/wadsworth .svg?branch=master )] ( https://travis-ci.org/Southclaws/wadsworth )
5+ [ ![ Build Status] ( https://travis-ci.org/picostack/picobot .svg?branch=master )] ( https://travis-ci.org/picostack/picobot )
66
7- Wadsworth is a git-driven task runner to automate the application of configs.
7+ Picobot is a git-driven task runner to automate the application of configs.
88
99## Overview
1010
11- Wadsworth is a little tool for implementing [ Git-Ops] [ git-ops ] in single-server environments. It's analogous to
11+ Picobot is a little tool for implementing [ Git-Ops] [ git-ops ] in single-server environments. It's analogous to
1212[ kube-applier] [ kube-applier ] , [ Terraform] [ terraform ] , [ Ansible] [ ansible ] but for automating lone servers that do not
1313need cluster-level orchestration.
1414
15- Instead, Wadsworth aims to be extremely simple. You give it some Git repositories and tell it to run commands when those
15+ Instead, Picobot aims to be extremely simple. You give it some Git repositories and tell it to run commands when those
1616Git repositories receive commits and that's about it. It also provides a way of safely passing in credentials from
1717[ Hashicorp's Vault] [ vault ] .
1818
@@ -21,16 +21,16 @@ Git repositories receive commits and that's about it. It also provides a way of
2121### Linux
2222
2323``` sh
24- curl -s https://raw.githubusercontent.com/Southclaws/wadsworth /master/install.sh | bash
24+ curl -s https://raw.githubusercontent.com/picostack/picobot /master/install.sh | bash
2525```
2626
2727Or via Docker:
2828
2929``` sh
30- docker pull southclaws/wadsworth :v1
30+ docker pull picostack/picobot :v1
3131```
3232
33- See the docker section below and the image on [ Docker Hub] ( https://hub.docker.com/r/southclaws/wadsworth ) .
33+ See the docker section below and the image on [ Docker Hub] ( https://hub.docker.com/r/picostack/picobot ) .
3434
3535### Everything Else
3636
@@ -39,22 +39,22 @@ Windows/Mac usage is probably just local testing so just use `go get` for these
3939
4040## Usage
4141
42- Currently, Wadsworth has a single command: ` run ` and it takes a single parameter: a Git URL. This Git URL defines the
43- "Config Repo" which contains Wadsworth configuration files. These configuration files declare where Wadsworth can find
44- "Target Repos" which are the repos that contain all the stuff you want to automate. The reason Wadsworth is designed
45- this way instead of just using the target repos to define what Wadsworth should do is 1. to consolidate Wadsworth config
42+ Currently, Picobot has a single command: ` run ` and it takes a single parameter: a Git URL. This Git URL defines the
43+ "Config Repo" which contains Picobot configuration files. These configuration files declare where Picobot can find
44+ "Target Repos" which are the repos that contain all the stuff you want to automate. The reason Picobot is designed
45+ this way instead of just using the target repos to define what Picobot should do is 1. to consolidate Picobot config
4646into one place, 2. separate the config of the tools from the applications and 3. keep your target repos clean.
4747
48- Wadsworth also has a Docker image - see below for docker-specific information.
48+ Picobot also has a Docker image - see below for docker-specific information.
4949
5050### Configuration
5151
52- The precursor to Wadsworth used JSON for configuration, this was fine for simple tasks but the ability to provide a
52+ The precursor to Picobot used JSON for configuration, this was fine for simple tasks but the ability to provide a
5353little bit of logic and variables for repetitive configurations is very helpful. Inspired by [ StackExchange's
54- dnscontrol] [ dnscontrol ] , Wadsworth uses JavaScript files as configuration. This provides a JSON-like environment with
54+ dnscontrol] [ dnscontrol ] , Picobot uses JavaScript files as configuration. This provides a JSON-like environment with
5555the added benefit of conditional logic.
5656
57- Here's a simple example of a configuration that should exist in the Wadsworth config repo that re-deploys a Docker
57+ Here's a simple example of a configuration that should exist in the Picobot config repo that re-deploys a Docker
5858Compose stack whenever it changes:
5959
6060``` js
7171
7272The ` T ` function declares a "Target" which is essentially a Git repository. In this example, the repository
7373` git@github.com:username/my-docker-compose-project ` would contain a ` docker-compose.yml ` file for some application
74- stack. Every time you make a change to this file and push it, Wadsworth will pull the new version and run the command
74+ stack. Every time you make a change to this file and push it, Picobot will pull the new version and run the command
7575defined in the ` up ` attribute of the target, which is ` docker-compose up -d ` .
7676
7777You can put as many target declarations as you want in the config file, and as many config files as you want in the
@@ -129,35 +129,27 @@ This would pass the environment variable `MOUNT_POINT=/data` to the `docker-comp
129129have a bunch of compose configs that all mount data to some path on the machine, you then use
130130` ${MOUNT_POINT}/postgres:/var/lib/postgres/data ` as a volume declaration in your ` docker-compose.yml ` .
131131
132- [ wadsworth ] : https://i.imgur.com/RCYbkiq.png
133- [ git-ops ] : https://www.weave.works/blog/gitops-operations-by-pull-request
134- [ kube-applier ] : https://github.com/box/kube-applier
135- [ terraform ] : https://terraform.io
136- [ ansible ] : https://ansible.com
137- [ vault ] : https://vaultproject.io
138- [ dnscontrol ] : https://stackexchange.github.io/dnscontrol/
139-
140132## Usage as a Docker Container
141133
142134See the ` docker-compose.yml ` file for an example and read below for details.
143135
144- You can run Wadsworth as a Docker container. If you're using it to deploy Docker containers via compose, this makes the
145- most sense. This is quite simple and is best done by writing a Docker Compose configuration for Wadsworth in order to
136+ You can run Picobot as a Docker container. If you're using it to deploy Docker containers via compose, this makes the
137+ most sense. This is quite simple and is best done by writing a Docker Compose configuration for Picobot in order to
146138bootstrap your deployment.
147139
148- The Wadsworth image is built on the ` docker/compose ` image, since most use-cases will use Docker or Compose to deploy
140+ The Picobot image is built on the ` docker/compose ` image, since most use-cases will use Docker or Compose to deploy
149141services. This means you must mount the Docker API socket into the container, just like Portainer or cAdvisor or any of
150142the other Docker tools that also run inside a container.
151143
152144The socket is located by default at ` /var/run/docker.sock ` and the ` docker/compose ` image expects this path too, so you
153145just need to add a volume mount to your compose that specifies ` /var/run/docker.sock:/var/run/docker.sock ` .
154146
155- Another minor detail you should know is that Wadsworth exposes a ` HOSTNAME ` variable for the configuration script.
147+ Another minor detail you should know is that Picobot exposes a ` HOSTNAME ` variable for the configuration script.
156148However, when in a container, this hostname is a randomised string such as ` b50fa67783ad ` . This means, if your
157- configuration performs checks such as ` if (HOSTNAME === 'server031') ` , this won't work. To resolve this, Wadsworth will
149+ configuration performs checks such as ` if (HOSTNAME === 'server031') ` , this won't work. To resolve this, Picobot will
158150attempt to read the environment variable ` HOSTNAME ` and use that instead of using ` /etc/hostname ` .
159151
160- This means, you can bootstrap a Wadsworth deployment with only two variables:
152+ This means, you can bootstrap a Picobot deployment with only two variables:
161153
162154``` env
163155VAULT_TOKEN=abcxyz
@@ -166,7 +158,7 @@ HOSTNAME=server012
166158
167159### Docker Compose and ` ./ ` in Container Volume Mounts
168160
169- Another caveat to running Wadsworth in a container to execute ` docker-compose ` is the container filesystem will not
161+ Another caveat to running Picobot in a container to execute ` docker-compose ` is the container filesystem will not
170162match the host filesystem paths.
171163
172164If you mount directories from your repository - a common strategy for versioning configuration - ` ./ ` will be expanded
@@ -177,3 +169,13 @@ The solution to this is both `DIRECTORY: "/cache"` and `/cache:/cache`: as long
177169exists on the host, Docker compose will expand ` ./ ` to the same path as the host and everything will work fine.
178170
179171This also means your config and target configurations will be persisted on the host's filesystem.
172+
173+ <!-- Links -->
174+
175+ [ wadsworth ] : https://i.imgur.com/RCYbkiq.png
176+ [ git-ops ] : https://www.weave.works/blog/gitops-operations-by-pull-request
177+ [ kube-applier ] : https://github.com/box/kube-applier
178+ [ terraform ] : https://terraform.io
179+ [ ansible ] : https://ansible.com
180+ [ vault ] : https://vaultproject.io
181+ [ dnscontrol ] : https://stackexchange.github.io/dnscontrol/
0 commit comments