{"id":13695318,"url":"https://github.com/Leen15/rancher-wrapper","last_synced_at":"2025-05-03T13:32:02.084Z","repository":{"id":152427831,"uuid":"65471435","full_name":"Leen15/rancher-wrapper","owner":"Leen15","description":"A php wrapper for use rancher API. Used for scale or upgrade services","archived":true,"fork":false,"pushed_at":"2016-08-13T13:24:13.000Z","size":61,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T18:19:33.591Z","etag":null,"topics":["api","docker","docker-image","rancher","rancher-wrapper","scale","upgrade","webhooks"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Leen15.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}},"created_at":"2016-08-11T13:26:18.000Z","updated_at":"2023-10-10T07:13:56.000Z","dependencies_parsed_at":"2024-04-19T02:32:42.802Z","dependency_job_id":null,"html_url":"https://github.com/Leen15/rancher-wrapper","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/Leen15%2Francher-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leen15%2Francher-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leen15%2Francher-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leen15%2Francher-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leen15","download_url":"https://codeload.github.com/Leen15/rancher-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224364274,"owners_count":17299042,"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":["api","docker","docker-image","rancher","rancher-wrapper","scale","upgrade","webhooks"],"created_at":"2024-08-02T18:00:21.147Z","updated_at":"2024-11-12T23:30:21.713Z","avatar_url":"https://github.com/Leen15.png","language":"PHP","funding_links":[],"categories":["Docker 3rd party tools php sdk"],"sub_categories":[],"readme":"RANCHER WRAPPER\n=======================\n\nThis project is a rancher API wrapper developed for using as webhooks in a Continuous Integration tool like Jenkins.  \n  \nIt's based on the great PHP wrapper written for laravel [here](https://github.com/benmag/laravel-rancher).  \n  \nIt doesn't include lots of functions, but for our CI process is enough.  \n  \nFirst of all, for use it you have to set these ENVS:\n\n     - APP_ENV=local                                     // standard for laravel\n     - APP_DEBUG=false                                   // standard for laravel\n     - APP_KEY=SomeRandomString                          // standard for laravel\n     - CACHE_DRIVER=file                                 // standard for laravel\n     - SESSION_DRIVER=file                               // standard for laravel\n     - QUEUE_DRIVER=sync                                 // standard for laravel\n\n     - RANCHER_BASE_URL=http://rancher.domain:81/v1/     // Rancher Api url\n     - RANCHER_ACCESS_KEY=access                         // Rancher Access Key\n     - RANCHER_SECRET_KEY=secret                         // Rancher secret Key\n\n     - BASIC_AUTH=1                                      // Enable Basic Auth\n     - HTPASSWD=user:pass_encrypted                      // Basic Auth Data \n\n\nRancher keys can be found in Rancher UI -\u003e API -\u003e Add Environment API KEY  \n  \nBasic Auth Data can be generated from command line or with online tools like [this](http://www.htaccesstools.com/htpasswd-generator/).  \n  \n  \nThis project is \"Docker Ready\" and can be deployed on same Rancher environment.  \n    \nAvailable Endpoints:\n--------------------\n**/api/hosts**  \nReturn the list of available hosts with hardware info  \n  \n**/api/hosts/:id**  \nReturn more host informations (like labels, endpoints etc)  \n  \n**/api/stacks**  \nReturn the list of all stacks configured  \n  \n**/api/stacks/:id**  \nReturn the stack and all services inside  \n  \n**/api/stacks/:id/services**  \nReturn an array of services for a stack  \n  \n**/api/stacks/:id/services/:id**  \nReturn a service from a stack  \n  \n**/api/services**  \nReturn the list of all services configured  \n  \n**/api/services/:id**  \nReturn a single service  \n  \n**/api/services/:id/upgrade**  \nUpgrade a service pulling ALWAYS the new image and starting new containers before stopping old ones.  \n  \n**/api/services/:id/finish_upgrade**  \nFinish the upgrade of a service, can be called immediately after the upgrade request, it waits that the service state changes to 'upgraded' and it finishes the upgrade changing the state to active again.  \n  \n**/api/services/:id/scale/:count**  \nCan scale a service with the count of instance passed in url.  \n  \n  \n  \nUse with Jenkins:\n--------------------\nFor use it with jenkins you can install the [HTTP Request Plugin](https://wiki.jenkins-ci.org/display/JENKINS/HTTP+Request+Plugin) and call first the \"upgrade\" endpoint and after the \"finish_upgrade\" endpoint.  \nThe jenkins build will fail if something goes wrong during the upgrade process and the build will be completed only when the service will finish the upgrade.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeen15%2Francher-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLeen15%2Francher-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeen15%2Francher-wrapper/lists"}