GRUA is a Puppet External Node Classifier (ENC) application. Here are some of its key features:
- Multi-tenant support: It is possible to manage multiple Puppet Servers (called Master Zones) with a single GRUA application;
- Multi-environments support: GRUA supports multiple Puppet Servers environments and it can automatically sync information about them;
- Access control: It is possible to establish selective restrictions of access to Master Zone, depending on the user permissions. Also, GRUA's API is protected and requires authentication;
- Group-orientation: Nodes can only be associated to groups. And groups are abstractions that are associated with a Puppet Server and one of its environments, that may contain classes and parameters.
GRUA uses the following technologies:
- Database: PostgreSQL 9.6.9
- Backend: Python 3.6 + Django 2 + Django Rest;
- Frontend: HTML5 + Sass + JS (ES6 + Babel) + Gulp.
- Docker image: postgres + contribsys/faktory + python:3-alpine
GRUA is very easy to install and deploy in Docker containers, through Docker Compose.
Set environment variables on docker-compose.yml
on scheduler
and worker
services:
...
scheduler:
...
environment:
- WEBAPP_USER=<username to be created>
- WEBAPP_PASS=<user pass to be created>
...
worker:
...
environment:
- WEBAPP_USER=<username to be created>
- WEBAPP_PASS=<user pass to be created>
...
Build the containers with:
docker-compose build
Apply database migrations with:
docker-compose run webapp python manage.py migrate
Create an admin user with the information provided in WEBAPP_USER
and WEBAPP_PASS
:
docker-compose run webapp python manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('<chosen username>', '<user email>', '<chosen password>')"
Spin up the containers with:
docker-compose up
By default, the Docker will expose port 8080. Therefore, you can access the main webapp at localhost:8000.
A more complete documentation of GRUA can be found on our wiki.
In order to a Puppet Server correctly communicate with GRUA there are two viable options:
- Use our puppet-grua module on each Puppet Server on your infrastructure that should be communicating with GRUA;
- Manually perform the following actions:
- Create a Master Zone for the Puppet Server:
- Obtain the Master Zone id (UUID) via GRUA's API (on /api/master_zones):
- Access the Puppet Server responsible for the Puppet CA;
- Generate a certificate for GRUA via Puppet CA;
- Sign this certificate via Puppet CA;
- Create/obtain a token on GRUA's admin page for an admin user (on /admin/authtoken/token/add/):
- Config Puppet Server's API permissions to allow requests with the generated certificate on the classes/environments endpoints (using Master Zone's UUID value and GRUA's auth token);
- Restart the Puppet Server;
- Upload the certificate file and the key file for the PuppetServer (Master Zone) via a PUT on GRUA API (on /api/master_zones/<master_zone_id>):
- Create a file on the Puppet Server to consult GRUA's API node_classifier endpoint (on /api/nodes/node_classifier/?certname=<node_certname>&master_id=<master_zone_id>);
- Restart the Puppet Server
- Repeat steps 9, 10 and 11 for each compiler on a non-monolithic server architecture.
We absolutely recommend you to choose the first option, as it is much easier and the straight-forward one to go with.
Our API is documented using Swagger and can be accessed on GRUA via /docs/ URL path.
- 0.1.0
- Public release
- 0.1.1
- Fix node-sass version on package.json
- Update info about environment variables
WEBAPP_USER
andWEBAPP_PASS
Distributed under the Apache 2 license. See LICENSE for more information.
- Oscar Esgalha (oscar at instruct dot com dot br)
- Aurora Wang (aurora dot wang at instruct dot com dot br);
- Dirceu Silva (dirceu dot silva at instruct dot com dot br);
- Fabio Iassia (fabio at instruct dot com dot br);
- Joao Nascimento (joao dot nascimento at instruct dot com dot br);
- João Sizílio (joao dot sizílio at instruct dot com dot br);
- Luana Lima (luana dot lima at instruct dot com dot br);
- Thiago Pena (thiagopena at instruct dot com dot br);
- Jeferson Costa (jeferson dot costa at instruct dot com dot br);