{"id":16879977,"url":"https://github.com/aledbf/systemd-go","last_synced_at":"2026-04-18T14:02:54.782Z","repository":{"id":22371107,"uuid":"25707480","full_name":"aledbf/systemd-go","owner":"aledbf","description":"deis systemd scripts in go","archived":false,"fork":false,"pushed_at":"2015-05-07T20:24:31.000Z","size":2208,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-25T13:44:27.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aledbf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-24T20:46:52.000Z","updated_at":"2015-05-07T20:24:31.000Z","dependencies_parsed_at":"2022-08-20T11:30:29.503Z","dependency_job_id":null,"html_url":"https://github.com/aledbf/systemd-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aledbf/systemd-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aledbf%2Fsystemd-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aledbf%2Fsystemd-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aledbf%2Fsystemd-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aledbf%2Fsystemd-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aledbf","download_url":"https://codeload.github.com/aledbf/systemd-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aledbf%2Fsystemd-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-13T15:56:46.249Z","updated_at":"2026-04-18T14:02:49.772Z","avatar_url":"https://github.com/aledbf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a work in progress. \n===============\n\nNOT READY TO USE!!!!\n===============\n\n\n\nBasically rewrite the current shell scripts in Go :)\n\nThis is just to improve the current output from the services and provide a way to customize the platform\n\nfrom:\n```console\n[Service]\nEnvironmentFile=/etc/environment\nTimeoutStartSec=30m\nExecStartPre=/bin/sh -c \"docker inspect deis-builder-data \u003e/dev/null 2\u003e\u00261 || docker run --name deis-builder-data -v /var/lib/docker ubuntu-debootstrap:14.04 /bin/true\"\nExecStartPre=/bin/sh -c \"IMAGE=`/run/deis/bin/get_image /deis/builder` \u0026\u0026 docker history $IMAGE \u003e/dev/null || docker pull $IMAGE\"\nExecStartPre=/bin/sh -c \"docker inspect deis-builder \u003e/dev/null \u0026\u0026 docker rm -f deis-builder || true\"\nExecStart=/bin/sh -c \"IMAGE=`/run/deis/bin/get_image /deis/builder` \u0026\u0026 docker run --name deis-builder --rm -p 2223:22 --volumes-from=deis-builder-data -e EXTERNAL_PORT=2223 -e HOST=$COREOS_PRIVATE_IPV4 --privileged $IMAGE\"\nExecStartPost=/bin/sh -c \"echo 'Waiting for builder on 2223/tcp...' \u0026\u0026 until echo 'dummy-value' | ncat $COREOS_PRIVATE_IPV4 2223 \u003e/dev/null 2\u003e\u00261; do sleep 1; done\"\nExecStartPost=/bin/bash -c \"nsenter --pid --uts --mount --ipc --net --target $(docker inspect --format='{{ .State.Pid }}' deis-builder) /usr/local/bin/push-images\"\nExecStopPost=-/usr/bin/docker rm -f deis-builder\nRestart=on-failure\nRestartSec=5\n```\n\nto:\n```console\n[Service]\nEnvironmentFile=/etc/environment\nTimeoutStartSec=30m\nExecStartPre=/opt/bin/launch-data-container -name=deis-builder\nExecStartPre=/opt/bin/check-image -image=/deis/builder\nExecStartPre=/opt/bin/remove-running-container -name=deis-builder\nExecStart=/opt/bin/launch-container -image=/deis/builder -name=deis-builder\nExecStartPost=/opt/bin/wait-for-port -port=2223/tcp -text=\"Waiting for builder on 2223/tcp...\"\nExecStartPost=/bin/bash -c \"nsenter --pid --uts --mount --ipc --net --target $(docker inspect --format='{{ .State.Pid }}' deis-builder) /usr/local/bin/push-images\"\nExecStopPost=/opt/bin/stop-container -name=deis-builder\nRestart=on-failure\nRestartSec=5\n```\n\nEvery ExecStartPre line is just a small go app doing the same thing than before.\nWhy different apps? To keep it simple, 1 app -\u003e 1 task\n\nIn ExecStart:\n```console\nExecStart=/opt/bin/launch-container -image=/deis/builder -name=deis-builder\n````\n\n**Objectives:**\n\n* Encapsulate the details\n* Avoid shell mess\n* use etcd to customize the service:\n```\n/deis/systemd/deis-builder/\n                           variables\n                           volumes\n                           ports\n```\n\ndoing this is possible to do other things:\n```\n/deis/systemd/app/defaults/\n                           variables\n                           volumes\n/deis/systemd/app/example-php/\n                           variables                                                                  \n````\n\n*In variables is possible to common custom variables without touching deis-controller python template*\n\n\n\n* swallow the output.\n\n  Show just what is necessary, things like `Unable to find image ubuntu-debootstrap:14.04 locally` are useless to new users.\n\n* show more details\n\n  Provide a way to get more details (something like in https://github.com/deis/deis/pull/2203) using /deis/debugMode to indicate this\n\n* Add /deis/platform/useNodeNames (-h %H)\n\n  Use the real node hostname inside the container (and not a generated one)\n\n\n### TODO:\n\n- [ ] check-image\n- [ ] launch-data-container\n- [ ] remove-running-container\n- [ ] stop-container\n- [x] wait-for-port\n- [ ] start-component\n- [ ] read /deis/platform/useNodeNames\n- [ ] **tests**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faledbf%2Fsystemd-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faledbf%2Fsystemd-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faledbf%2Fsystemd-go/lists"}