{"id":20846683,"url":"https://github.com/scaleit-org/spsc-app-registration-sidecar","last_synced_at":"2026-04-16T14:37:19.350Z","repository":{"id":92694842,"uuid":"111714438","full_name":"ScaleIT-Org/spsc-app-registration-sidecar","owner":"ScaleIT-Org","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-03T12:56:06.000Z","size":390,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-12T11:48:43.415Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScaleIT-Org.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-22T17:38:11.000Z","updated_at":"2018-10-03T12:56:07.000Z","dependencies_parsed_at":"2023-05-29T22:30:57.292Z","dependency_job_id":null,"html_url":"https://github.com/ScaleIT-Org/spsc-app-registration-sidecar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ScaleIT-Org/spsc-app-registration-sidecar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleIT-Org%2Fspsc-app-registration-sidecar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleIT-Org%2Fspsc-app-registration-sidecar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleIT-Org%2Fspsc-app-registration-sidecar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleIT-Org%2Fspsc-app-registration-sidecar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScaleIT-Org","download_url":"https://codeload.github.com/ScaleIT-Org/spsc-app-registration-sidecar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleIT-Org%2Fspsc-app-registration-sidecar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31891036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-18T02:17:25.658Z","updated_at":"2026-04-16T14:37:19.337Z","avatar_url":"https://github.com/ScaleIT-Org.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScaleIT Registration Sidecar\n\n## Platform Integrated\n\nIf you have already pushed the Registration Sidecar Image to your docker registry, add this sidecar to your launch configuration (eg. docker-compose) in order to register it to the ETCD App Registry.\n\nIn the Rancher Catalog entry for your app, you need to have the following files. Add all environment variables to the \n\n\t|---de-kit-black-cylinder/\n\t  |---catalogIcon-de-kit-black-cylinder.png\n\t  |---config.yml\n\t  \\---0/\n\t    |-----docker-compose.yml\n\t    \\-----rancher-compose.yml\n\nThis is how your docker-compose.yml for the catalog should look like:\n\n\tversion: '2'\n\tservices:\n\t    de-kit-black-cylinder:\n\t        image: scaleit-app-pool.ondics.de:5000/scaleit-app-pool/de-kit-black-cylinder:1.0\n\t        ports:\n\t          - \"51102:80\"\n        \n\t    de-kit-black-cylinder-sidecar-registration:\n\t    \timage: scaleit-app-pool.ondics.de:5000/scaleit-app-pool/de-kit-sidecar-registration:1.0\n\t    \tenvironment:\n\t          - ETCD_IP=10.0.0.200\n\t          - ETCD_PORT=49501\n\t          - APP_PORT=51102\n\t          - APP_ID=de-kit-black-cylinder_1\n\t          - APP_NAME=de-kit-black-cylinder\n\t          - APP_TITLE=Black Cylinder Nutzen\n\t          - APP_SHORTDESCRIPTION=Black Cylinder Nutzen Digital Twin\n\t          - APP_DESCRIPTION=Proof of Concept Black Cylinder Nutzen Digital Twin\n\t          - APP_CATEGORY=domainApp\n\t          - APP_STATUS=online\n\t          - APP_ICON_URL=http://10.0.0.200:51102/assets/icon/appHubIcon-de-kit-black-cylinder.png\n\t          - APP_USER_URL=http://10.0.0.200:51102/#/user\n\t          - APP_USER_DOC_URL=\n\t          - APP_USER_STATUS_URL=\n\t          - APP_DEV_DOC_URL=\n\t          - APP_DEV_SWAGGER_URL=\n\t          - APP_ADMIN_URL=http://10.0.0.200:51102/#/admin\n\t          - APP_ADMIN_CONFIG_URL=\n\t          - APP_ADMIN_DOC_URL=\n\t          - APP_ADMIN_LOG_URL=\n\t          - APP_ADMIN_STATUS_URL=\n\t          - APP_API_ENTRYPOINT=\n\t          - APP_UPDATEDAT=2018-04-11T12:32:16.581Z\n\t          - APP_TYPE=domainApp\n\nIf this docker-compose is launched in Rancher as a stack it will pull the images and start the containers. The registration sidecar will register the values of the env variables above in the registry.\n\nYou could query the registry via the ETCD Browser usually located at `\u003cserver-address\u003e:45902`\n\n## Standalone Usage\n\n1. Clone this repository to your main application\n\n2. Configure config.env in the cloned repository. To configure config.env appropriately, refer to configurations of the etcd, your application has to be registered in.\n\n3. How to use:\n    1. Run \"docker-compose up\" to start the script as standalone \n    2. Or add\n        \n```\n  sidecarregistration:\n    build: ./sidecar-registration/\n    env_file:\n      - ./sidecar-registration/config.env\n``` \nto your docker-compose file. \n\n## Checking Proper Configuration\n\nChecking the sidecar: in order to check whether the sidecar is configured correctly, open your etcd browser (http://$ETCD_IP:$ETCD_PORT) and find your app in the etcd filesystem. See the screenshot-example below. Furthmore you can also refer to the section \"explanation\". \n![Correctness check](https://github.com/ScaleIT-ORG/spsc-app-registration/blob/master/Resources/Documentation/check.png)\n\n# architecture\n\n![Registration Sidecar Architecture Concept](https://github.com/ScaleIT-ORG/spsc-app-registration/blob/master/Resources/Documentation/architecture.png)\n\n# explanation\n\n![The process of application's registration](https://github.com/ScaleIT-ORG/spsc-app-registration/blob/master/Resources/Documentation/App%20-%20Registration.png)\n\nThis is where the Magic happens\n\nAt first it checks if ETCD is up and Running or waits till it gets a healthy signal from the ETCD Storage \n\n```bash\n#check if etcd is up and running\nSTR='\"health\": \"false\"'\nSTR=$(curl -sb -H \"Accept: application/json\" \"http://$ETCD_IP:$ETCD_PORT/health\")\nwhile [[ $STR != *'\"health\": \"true\"'* ]]\ndo\n        echo \"Waiting for etcd ...\"\n        STR=$(curl -sb -H \"Accept: application/json\" \"http://$ETCD_IP:$ETCD_PORT/health\")\n        sleep 1\ndone\n```\n\nThen the application registers its keys. For example the following:\n* $APP_URL\n* $APP_ICON\n* $APPHUB_ICON\n* $APP_DESCRIPTION\n* $APP_VISIBLEFORROLE\n* $APP_TYPE\n\n```bash\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/url -d value=\"$APP_URL\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/App_Icon -d value=\"$APP_ICON\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/AppHub_Icon -d value=\"$APPHUB_ICON\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/description -d value=\"$APP_DESCRIPTION\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/lifecycleStatus -d value=\"Online\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/visibleForRole -d value=\"$APP_VISIBLEFORROLE\"\ncurl -L -X PUT http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME/appType -d value=\"$APP_TYPE\"\n```\n\nAdditionaly there is a SIGTERM handler which catches the ctr+c command and unregisters the application with:\n```bash\ncurl -L -X PUT 'http://$ETCD_IP:$ETCD_PORT/v2/keys/$APP_NAME?recursive=true' -XDELETE\n```\n\nThe script also starts the main Application and executes a endless loop to catch the ctr+c Signal while the container is up and running\n```bash\n# wait forever\nwhile true\ndo\n  tail -f /dev/null \u0026 wait ${!}\ndone\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleit-org%2Fspsc-app-registration-sidecar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleit-org%2Fspsc-app-registration-sidecar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleit-org%2Fspsc-app-registration-sidecar/lists"}