Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

mantl traefik

TanyaCouture edited this page Mar 11, 2016 · 2 revisions

mantl-packaging/packages/traefik: add ansible role to previously built rpm

traefik: 2 versions to be consolidated and in progress

  • traefik: mantl-edge

    • Notes
      • This will install the traefik binary, and configure the certs, but that depends on how we bootstrap the cluster
  • traefik: mantl-traefik This role should be installed with yum in common and
    cloud_init. See https://github.com/CiscoCloud/mantl/issues/933

    - install traefik from the internet
    - copy certs to `/etc/traefik/certs/`
    - copy traefik.toml to `/etc/traefik/`
    - copy traefik consul service to `/etc/consul/`
    
    • Dependencies

      • mantl-consul
    • solutions: traefik is directly installed from github/traefik, already in

    traefik/defaults/main.yml // defines traefik variables // traefik_package: asteris internal package // traefik_marathon_endpoint: consul dns domain // traefik_marathon_domain: marathon.localhost - > file should be copied to traefik package with traefik_package removed

    traefik/files/traefik-consul.json // json config

    traefik/handlers/main.yml -> systemctl reload consul -> systemctl restart traefik

    traefik/tasks/main.yml // uses traefik variables to download traefik-consul // download traefik_download // run checksum(traefik_sha256-checksum) // install in /root/traefik_filename -> ->

    // sudo install traefik in /root/traefik_filename
      // state is present
    
    // make certificate directory /etc/traefik/certs
    solutions:
      -> `mkdir /etc/traefik/certs`
    
    // copy ssl/certs/traefik-admin.cert.pem  ssl/private/traefik-admin.key.pem  to the certs directory
    solutions:
      -> `cp -p ssl/certs/traefik-admin.cert.pem /etc/traefik/certs/`
      -> `cp -p ssl/private/traefik-admin.key.pem /etc/traefik/certs/`
    
    // configure traefik
        // copy traefik.toml.j2 to /etc/traefik/traefik.toml
        // backup file
        // permission 0644
        // restart traefik
      solutions:
    

√ -> -src: traefik.toml to dest: /etc/traefik/

  // generate traefik consul service
    // sudo copy traefik-consul.json to /etc/consul/traefik.json
    // reload consul
    solutions:

√ -> src: traefik-consul.json dest: /etc/consul/traefik.json -> systemctl reload consul

  roles/traefik/templates
  // traefik.toml.j2
Clone this wiki locally