zebracasket / traefik-dev-1

This Framework will make it possible to deploy traefik as a container complete with CI/CD pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traefik stack

This repository is a complete traefik stack able to be deployed in minutes

It uses the following tools to accomplish that: Ansible, GitHub Actions

There are a few prerequisites before deployment.

Prerequisites

1 - GitHub secrets for usage

To create GitHub secrets follow this link: https://docs.github.com/en/actions/security-guides/encrypted-secrets

The following secrets are used for deployment: secrets

2 - Target server(s) reachable via ssh over the internet

Also make sure that your forked repo has the right inventory secrets defined. If not, the intergrate.yml pipeline can't run on the target server(s) inventory

The intergrate.yml can be found under: ./FORKED REPO/.github/workflows

Feel free to add, or change the ansible deployment script according to your needs. Do not forget to change the traefik URL in the docker-compose file, to a C-NAME record which points to your public IP using DynDNS (DDNS)

3 - Env file for deployment Make sure to define a .env file in the Root with the following schema:

url=subdomain.domainname port=port to your traefik service domain=FQDN

4 - create docker networks for manual deployment Make sure to manually create the networks traefik will use before the manual deployment.

Installation

Fork this project with GitHub

  git clone git@github.com:USERNAME/FORKED-PROJECT.git
  cd /path/to/FORKED-PROJECT

Deployment

To deploy this project run

  git push <REMOTENAME> master 

The master branch will trigger the pipeline for deployment. Or you can dispatch the workflow by going to:

On the forked repo homepage

page 1

Navigate to the Actions page

page 2

Trigger Deployment

Select the work flow you want to trigger and press the blue underscored button. page 3

Ansible Deployment

Another way to create a deployment is to download the following file: /deployments/deployment.yml Make sure Ansible is installed on the target server and change the variables in my ansible script to reflect your own environment (like the become user)

About

This Framework will make it possible to deploy traefik as a container complete with CI/CD pipeline