{"id":19476853,"url":"https://github.com/openchemistry/certbot-rancher","last_synced_at":"2025-04-15T09:04:21.135Z","repository":{"id":45047534,"uuid":"333810332","full_name":"OpenChemistry/certbot-rancher","owner":"OpenChemistry","description":"Images to use certbot in Rancher environment without elevated privileges.","archived":false,"fork":false,"pushed_at":"2022-01-12T17:55:16.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-10T19:49:25.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenChemistry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-28T16:04:15.000Z","updated_at":"2024-08-17T23:56:33.000Z","dependencies_parsed_at":"2022-09-23T10:42:15.821Z","dependency_job_id":null,"html_url":"https://github.com/OpenChemistry/certbot-rancher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenChemistry%2Fcertbot-rancher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenChemistry%2Fcertbot-rancher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenChemistry%2Fcertbot-rancher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenChemistry%2Fcertbot-rancher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenChemistry","download_url":"https://codeload.github.com/OpenChemistry/certbot-rancher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232988633,"owners_count":18607449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T19:42:14.815Z","updated_at":"2025-01-08T06:36:29.992Z","avatar_url":"https://github.com/OpenChemistry.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThis repository can be used to build two images to generate and\ninstall certificates using certbot in a Rancher environment. Note that if you have\nthe required admin permissions you should look at a cert-manager based solution.\n\nThis repository builds two containers:\n\n- `Dockerfile.nginx` (openchemistry/certbot-nginx) - A nginx container that will\n  expose `.well-known/acme-challenge`\n  for a give host. The NGINX_HOST environment variable is used to set `server_name`.\n- `Dockerfile.rancher` openchemistry/certbot-rancher) - A certbot/certbot based\n  container with add hooks to copy certificates into a Rancher certificate.\n\n# Usage\n\nSeveral workloads need to be created from the two images.\n\n## NGINX workload\n\nThis workload needs to be created from the `openchemistry/certbot-nginx` image.\nIt expose .well-known/acme-challenge that is generated by certbot. A volume should\nmounted at `/usr/share/nginx/html`, this volume will also be mounted into the\nsecond workload.\n\n### Configuration\n\nThe following environment variables must be configured on the workload:\n\n- `NGINX_HOST` - This should be the domain that a certificate is being requested\n  for.\n\nThe appropriate ingress should be setup to allow 80 to be routed to this workload.\n\n## Certbot workloads\n\nYou will need two workloads here, one to do the initial setup (with an entrypoint\nof `/scripts/setup.sh`) this one will just be used once ( can be run as a Job ).\nThe second should be setup on a cron schedule to renew the certificate (with an\nentrypoint of `/scripts/renew.sh`).\n\nThese workload needs to be created from the `openchemistry/certbot-rancher` they will\nbe used to execute the certbot commands. The volume attached to the NGINX workload\nshould be mount to `/data/letsencrypt`, this is where certbot will write the\nchallenge. A second volume should be mounted at `/etc/letsencrypt`, this is where\ncertbot will write the certificates.\n\n### Configuration\n\nThe following environment variables must be configured on these workloads:\n\n- `DOMAIN` - The domain that the SSL cert is to be generated for.\n- `CERT_NAME` - The name to give the SSL cert in Rancher.\n- `NAMESPACE` - The Rancher namespace to create the certificate in.\n- `ENDPOINT_URL` - The to use to login to Rancher (for example: https://rancher2.spin.nersc.gov/v3).\n- `CONTEXT` - The rancher project id.\n- `EMAIL` - The email for certbot to use for notifications.\n\nThe following secret should be mounted into the workload:\n- `/secrets/bearer-token` - This should contain the bearer token to be used for `rancher login`.\n\n\n### Script\n\nThe image provides two script that can be used as entrypoints:\n\n- `/scripts/setup.sh` - Run to create the initial certificate.\n- `/scripts/renew.sh` - Run periodically to renew the certificate it necessary.\n\n\nOnce the initial setup workload job has been execute a Rancher certificate will have\nbeen created and can be used by the appropriate ingress.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchemistry%2Fcertbot-rancher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenchemistry%2Fcertbot-rancher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchemistry%2Fcertbot-rancher/lists"}