1- # Picobot
1+ # Pico
22
33_ The little git robot of automation!_
44
5- [ ![ Build Status] ( https://travis-ci.org/picostack/picobot .svg?branch=master )] ( https://travis-ci.org/picostack/picobot )
5+ [ ![ Build Status] ( https://travis-ci.org/picostack/pico .svg?branch=master )] ( https://travis-ci.org/picostack/pico )
66
7- Picobot is a git-driven task runner to automate the application of configs.
7+ Pico is a git-driven task runner to automate the application of configs.
88
99## Overview
1010
11- Picobot is a little tool for implementing [ Git-Ops] [ git-ops ] in single-server environments. It's analogous to
11+ Pico 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, Picobot aims to be extremely simple. You give it some Git repositories and tell it to run commands when those
15+ Instead, Pico 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/picostack/picobot /master/install.sh | bash
24+ curl -s https://raw.githubusercontent.com/picostack/pico /master/install.sh | bash
2525```
2626
2727Or via Docker:
2828
2929``` sh
30- docker pull picostack/picobot :v1
30+ docker pull picostack/pico :v1
3131```
3232
33- See the docker section below and the image on [ Docker Hub] ( https://hub.docker.com/r/picostack/picobot ) .
33+ See the docker section below and the image on [ Docker Hub] ( https://hub.docker.com/r/picostack/pico ) .
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, 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
42+ Currently, Pico has a single command: ` run ` and it takes a single parameter: a Git URL. This Git URL defines the
43+ "Config Repo" which contains Pico configuration files. These configuration files declare where Pico can find
44+ "Target Repos" which are the repos that contain all the stuff you want to automate. The reason Pico is designed
45+ this way instead of just using the target repos to define what Pico should do is 1. to consolidate Pico config
4646into one place, 2. separate the config of the tools from the applications and 3. keep your target repos clean.
4747
48- Picobot also has a Docker image - see below for docker-specific information.
48+ Pico also has a Docker image - see below for docker-specific information.
4949
5050### Configuration
5151
52- The precursor to Picobot used JSON for configuration, this was fine for simple tasks but the ability to provide a
52+ The precursor to Pico 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 ] , Picobot uses JavaScript files as configuration. This provides a JSON-like environment with
54+ dnscontrol] [ dnscontrol ] , Pico 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 Picobot config repo that re-deploys a Docker
57+ Here's a simple example of a configuration that should exist in the Pico 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, Picobot will pull the new version and run the command
74+ stack. Every time you make a change to this file and push it, Pico 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
@@ -133,23 +133,23 @@ have a bunch of compose configs that all mount data to some path on the machine,
133133
134134See the ` docker-compose.yml ` file for an example and read below for details.
135135
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
136+ You can run Pico 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 Pico in order to
138138bootstrap your deployment.
139139
140- The Picobot image is built on the ` docker/compose ` image, since most use-cases will use Docker or Compose to deploy
140+ The Pico image is built on the ` docker/compose ` image, since most use-cases will use Docker or Compose to deploy
141141services. This means you must mount the Docker API socket into the container, just like Portainer or cAdvisor or any of
142142the other Docker tools that also run inside a container.
143143
144144The socket is located by default at ` /var/run/docker.sock ` and the ` docker/compose ` image expects this path too, so you
145145just need to add a volume mount to your compose that specifies ` /var/run/docker.sock:/var/run/docker.sock ` .
146146
147- Another minor detail you should know is that Picobot exposes a ` HOSTNAME ` variable for the configuration script.
147+ Another minor detail you should know is that Pico exposes a ` HOSTNAME ` variable for the configuration script.
148148However, when in a container, this hostname is a randomised string such as ` b50fa67783ad ` . This means, if your
149- configuration performs checks such as ` if (HOSTNAME === 'server031') ` , this won't work. To resolve this, Picobot will
149+ configuration performs checks such as ` if (HOSTNAME === 'server031') ` , this won't work. To resolve this, Pico will
150150attempt to read the environment variable ` HOSTNAME ` and use that instead of using ` /etc/hostname ` .
151151
152- This means, you can bootstrap a Picobot deployment with only two variables:
152+ This means, you can bootstrap a Pico deployment with only two variables:
153153
154154``` env
155155VAULT_TOKEN=abcxyz
@@ -158,7 +158,7 @@ HOSTNAME=server012
158158
159159### Docker Compose and ` ./ ` in Container Volume Mounts
160160
161- Another caveat to running Picobot in a container to execute ` docker-compose ` is the container filesystem will not
161+ Another caveat to running Pico in a container to execute ` docker-compose ` is the container filesystem will not
162162match the host filesystem paths.
163163
164164If you mount directories from your repository - a common strategy for versioning configuration - ` ./ ` will be expanded
0 commit comments