### Starting OSS Puppet Setup with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md This command starts the basic OSS Puppet setup using docker compose, specifically activating the 'puppet' profile. It runs the services in detached mode. ```shell docker compose --profile puppet up -d ``` -------------------------------- ### Start OpenVox Docker Compose Services (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/r10k/README.md Starts the OpenVox services defined in the Docker Compose file using the 'openvox' profile in detached mode (-d). Includes a subsequent command to list running containers and check their status. ```shell docker compose --profile openvox up -d # check if compose is ready docker compose ps ``` -------------------------------- ### Starting HDM with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md This command starts the HDM (presumably a dashboard or related service) using docker compose, activating the 'hdm' profile. It runs the service in detached mode. ```shell docker compose --profile hdm up -d ``` -------------------------------- ### Start Load Balancer Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/ha/README.md Starts the Docker Compose services for the load balancer profile in detached mode. ```shell docker compose --profile lb up -d ``` -------------------------------- ### Start Load Balancer Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/ha/README.md Starts the Docker Compose services defined in the 'lb' profile in detached mode. ```shell docker compose --profile lb up -d ``` -------------------------------- ### Start OpenVox Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/ha/README.md Starts the Docker Compose services for the OpenVox profile in detached mode and checks their status. ```shell docker compose --profile openvox up -d # check if compose is ready docker compose ps ``` -------------------------------- ### Starting OpenVox Stack with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Starts the OpenVox services defined in the 'openvox' profile using Docker Compose in detached mode. ```shell docker compose --profile openvox up -d ``` -------------------------------- ### Start Puppet Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/ha/README.md Starts the Docker Compose services defined in the 'puppet' profile in detached mode and then checks their status. ```shell docker compose --profile puppet up -d # check if compose is ready docker compose ps ``` -------------------------------- ### Execute Cleanup Script (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/r10k/README.md Runs the local script './clean.sh' to remove resources created during the setup process, facilitating a clean state for subsequent runs. ```shell ./clean.sh ``` -------------------------------- ### Clean Up Example (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/ha/README.md Executes the cleanup script to remove resources created by the example. ```shell ./clean.sh ``` -------------------------------- ### Starting HDM Stack with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Starts the HDM services defined in the 'hdm' profile using Docker Compose in detached mode. ```shell docker compose --profile hdm up -d ``` -------------------------------- ### Verify Puppet Code Directory in r10k Container (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/r10k/README.md Executes a command inside the 'r10k-compiler-003-1' container to list the contents of the '/etc/puppetlabs/code/environments' directory, verifying that r10k successfully populated the code. ```shell docker exec -it r10k-compiler-003-1 ls -la /etc/puppetlabs/code/environments ``` -------------------------------- ### Test Agent with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/ha/README.md Runs a test agent service from the 'test' profile using Docker Compose. ```shell docker compose --profile test run testing agent -t ``` -------------------------------- ### Run r10k Docker Compose Service (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/r10k/README.md Executes the r10k service within the Docker Compose setup using the 'r10k' profile. The '--rm' flag ensures the container is removed after execution. This step populates the Puppet code volume. ```shell docker compose --profile r10k run --rm r10k ``` -------------------------------- ### Getting Base64 Encoded Puppet Certificates (Bash) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md These commands retrieve the CA certificate, the generated 'puppetboard' certificate, and its private key from inside the 'oss-puppet-1' container and encode them using base64. This is useful for providing certificates as strings, e.g., for configuration. ```bash docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/certs/ca.pem | base64 docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/certs/puppetboard.pem | base64 docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/private_keys/puppetboard.pem | base64 ``` -------------------------------- ### Cleaning Up Docker Compose Services and Volumes (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md This sequence of commands brings down the 'puppet', 'hdm', and 'test' docker compose profiles and then removes associated docker volumes to clean up the environment. ```shell docker compose --profile puppet down docker compose --profile hdm down docker compose --profile test down docker volume rm oss_puppetserver docker volume rm oss_puppetserver-ssl docker volume rm oss_puppetserver-ca docker volume rm oss_puppetdb docker volume rm oss_puppetdb-postgres docker volume rm oss_agent-ssl ``` -------------------------------- ### Test Puppet Agent Run (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/ha/README.md Runs a one-off container using the 'test' profile and executes the 'puppet agent -t' command within it to test communication with the Puppet masters. ```shell docker compose --profile test run testing puppet agent -t ``` -------------------------------- ### Run Cleanup Script (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/ha/README.md Executes the local cleanup script './clean.sh' to remove the created resources. ```shell ./clean.sh ``` -------------------------------- ### Generate LB Certificate and Copy (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/ha/README.md Executes a command inside the 'ha-ca-1' container to generate an SSL certificate for the load balancer ('puppet-lb') with specified subject alternative names, and then copies the CA certificate, the generated certificate, and its private key to the 'nginx-ssl' directory. ```shell docker exec -ti ha-ca-1 puppetserver ca generate --certname puppet-lb --subject-alt-names puppet,localhost cp server-data/puppet-ca-ssl/certs/ca.pem nginx-ssl/ca.pem cp server-data/puppet-ca-ssl/certs/puppet-lb.pem nginx-ssl/cert_puppet.pem cp server-data/puppet-ca-ssl/private_keys/puppet-lb.pem nginx-ssl/priv_puppet.pem ``` -------------------------------- ### Testing Puppet Agent with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md After the puppet profile is running, this command executes a test run of the puppet agent within the 'test' profile. It uses the '-t' flag for verbose output. ```shell docker compose --profile test run testing puppet agent -t ``` -------------------------------- ### Prepare Release Branch on Fork (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/RELEASE.md Sets the release version, switches to the main branch, pulls updates, creates a new release branch with a specific naming convention, installs dependencies, generates the changelog using a GitHub token, commits changes, and pushes the release branch to the origin fork. Requires the `CHANGELOG_GITHUB_TOKEN` environment variable. ```shell export RELEASE_VERSION="X.Y.Z" git switch main git pull -r git switch -c release-v$RELEASE_VERSION bundle config set --local path vendor/bundle bundle install CHANGELOG_GITHUB_TOKEN="token_MC_tokenface" bundle exec rake changelog git commit -am "Release v${RELEASE_VERSION}" git push origin release-v$RELEASE_VERSION ``` -------------------------------- ### Generating Additional Puppet Certificate (Bash) Source: https://github.com/voxpupuli/crafty/blob/main/puppet/oss/README.md This command executes the `puppetserver ca generate` command inside the running 'oss-puppet-1' container to generate a new certificate for the specified certname ('puppetboard'). The generated certificate and keys are placed in the puppetserver's SSL directory. ```bash docker exec oss-puppet-1 puppetserver ca generate --certname puppetboard ``` -------------------------------- ### Generate LB Certificate with Puppetserver (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/ha/README.md Executes a command inside the 'ha-ca-1' container to generate an SSL certificate for the load balancer ('openvox-lb') using Puppetserver CA, including subject alternative names. Then copies the generated CA, certificate, and private key files to the 'nginx-ssl' directory. ```shell docker exec -ti ha-ca-1 puppetserver ca generate --certname openvox-lb --subject-alt-names openvox,localhost cp server-data/openvox-ca-ssl/certs/ca.pem nginx-ssl/ca.pem cp server-data/openvox-ca-ssl/certs/openvox-lb.pem nginx-ssl/cert_puppet.pem cp server-data/openvox-ca-ssl/private_keys/openvox-lb.pem nginx-ssl/priv_puppet.pem ``` -------------------------------- ### Testing Agent with Docker Compose (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Runs a test agent container using the 'test' profile to perform testing, likely against the running OpenVox stack. ```shell docker compose --profile test run testing agent -t ``` -------------------------------- ### Pulling OpenVox Server Container Image Source: https://github.com/voxpupuli/crafty/blob/main/README.md Provides an example command using Docker to pull a specific version of the containerized OpenVox server image from the GitHub Container Registry. ```shell docker pull ghcr.io/openvoxproject/openvoxserver:8.8.0-latest ``` -------------------------------- ### Cleaning Up Docker Compose Stacks and Volumes (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Stops and removes the OpenVox, HDM, and test Docker Compose stacks and removes associated volumes to clean up the environment. ```shell docker compose --profile openvox down docker compose --profile hdm down docker compose --profile test down docker volume rm oss_openvoxserver docker volume rm oss_openvoxserver-ssl docker volume rm oss_openvoxserver-ca docker volume rm oss_openvoxdb docker volume rm oss_openvoxdb-postgres docker volume rm oss_agent-ssl ``` -------------------------------- ### Retrieving Base64 Encoded Certificates via Docker Exec (Bash) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Executes commands inside the 'oss-puppet-1' container to read certificate files (CA, puppetboard cert, puppetboard private key) and encode their content in base64 for potential use as configuration strings. ```bash docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/certs/ca.pem | base64 docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/certs/puppetboard.pem | base64 docker exec oss-puppet-1 cat /etc/puppetlabs/puppet/ssl/private_keys/puppetboard.pem | base64 ``` -------------------------------- ### Generating Puppet Certificate via Docker Exec (Bash) Source: https://github.com/voxpupuli/crafty/blob/main/openvox/oss/README.md Executes a command inside the 'oss-puppet-1' container to generate a new Puppet certificate for the specified certname ('puppetboard'). The generated certificate and key are saved within the container's SSL volume. ```bash docker exec oss-puppet-1 puppetserver ca generate --certname puppetboard ``` -------------------------------- ### CRAFTY Container Version Schema Format Source: https://github.com/voxpupuli/crafty/blob/main/README.md This snippet defines the versioning format used for the CRAFTY container images, combining the contained OpenVox/Puppet version with the container's own versioning. ```text ..-v.. ``` -------------------------------- ### Tag Release on Upstream Main (Shell) Source: https://github.com/voxpupuli/crafty/blob/main/RELEASE.md After the release branch is merged into the main branch, this snippet switches to the main branch, pulls the latest changes, creates a Git tag for the release version following the vX.Y.Z format, and pushes the tags to the upstream repository. ```shell git switch main git pull -r git tag v$RELEASE_VERSION git push --tags ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.