{"id":13450313,"url":"https://github.com/aboutdotme/rancher-client","last_synced_at":"2025-03-23T16:31:15.922Z","repository":{"id":80920515,"uuid":"56553786","full_name":"aboutdotme/rancher-client","owner":"aboutdotme","description":"A dockerize rancher client","archived":false,"fork":false,"pushed_at":"2018-09-26T15:31:05.000Z","size":1695,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-07-31T07:15:32.048Z","etag":null,"topics":["docker","docker-compose","rancher","rancher-api","rancher-cli"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboutdotme.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-19T01:11:54.000Z","updated_at":"2020-10-29T10:30:21.000Z","dependencies_parsed_at":"2023-02-28T22:15:50.591Z","dependency_job_id":null,"html_url":"https://github.com/aboutdotme/rancher-client","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/aboutdotme%2Francher-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutdotme%2Francher-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutdotme%2Francher-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutdotme%2Francher-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboutdotme","download_url":"https://codeload.github.com/aboutdotme/rancher-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221856386,"owners_count":16892435,"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":["docker","docker-compose","rancher","rancher-api","rancher-cli"],"created_at":"2024-07-31T07:00:33.539Z","updated_at":"2024-10-28T16:30:56.678Z","avatar_url":"https://github.com/aboutdotme.png","language":"Shell","funding_links":[],"categories":["Rancher 1.0"],"sub_categories":["Community projects 1.0"],"readme":"# rancher-client\n\nRancher API client for containerized deployments and management.  This tool\nwraps the rancher cli tool in a Docker image, along with a few other helper\ntools so that this can be used as a standalone tool.\n\nItems built into the image:\n\n* bash\n* yaml (for parsing docker-compose files)\n* curl\n* docker (for proxying docker commands through the rancher cli)\n\n### Usage\n\nThe rancher-client relies on local credentials to be configured for dockerhub\nand rancher.  These credential values can all be passed in via environment\nvariables or enabld by mounting configurations in as volumes.\n\n#### Running via prebuilt image\n\nIf you don't need to log into docker, use:\n\n```bash\ndocker run -it --rm -v \"$HOME/.rancher:/root/.rancher\" \\\n    aboutdotme/rancher-client \u003ccommand\u003e [options]\n```\n\nIf you need private docker credentials, use:\n\n\n```bash\ndocker run -it --rm \\\n    -v \"$HOME/.rancher:/root/.rancher\" \\\n    -v \"$HOME/.docker:/root/.docker\" \\\n    aboutdotme/rancher-client \u003ccommand\u003e [options]\n```\n\nThis can be aliased for ease of use:\n\n```bash\nalias rancher-client=\"docker run -it --rm -v $HOME/.rancher:/root/.rancher \\\n    -v $HOME/.docker:/root/.docker aboutdotme/rancher-client\"\n```\n\n#### Running via checked out repository\n\nTo check out the repository and run the commands directly, use:\n\n```bash\ngit clone https://github.com/aboutdotme/rancher-client\ncd rancher-client\ndocker-compose build\n```\n\nTo enable rancher environment variables, uncomment the following lines in the\n`docker-compose.yml` file and update them to reflect your environment.\n\n```\n    #   RANCHER_URL: ''\n    #   RANCHER_ACCESS_KEY: ''\n    #   RANCHER_SECRET_KEY: ''\n    #   RANCHER_ENVIRONMENT: ''\n```\n\nTo enable local credentials, uncomment the following lines in the\n`docker-compose.yml` file.\n\n```\n    # volumes:\n    #   - ./entrypoint.sh:/usr/local/bin/entrypoint\n    #   - ~/.rancher/cli.json:/root/.rancher/cli.json\n    #   - ~/.docker/config.json:/root/.docker/config.json\n```\n\nNOTE: If you don't mount in the docker credential file you will not be able to\npull any private Docker images.  You will have to login to the container and\nconfigure the credentials to work around this issue.\n\nTo run the rancher-client:\n\n`docker-compose run --rm rancher_client \u003ccommand\u003e [options]`\n\nTo make working with the Docker image easier you can create an alias:\n\n```\nalias rancher-client=\"docker-compose run --rm rancher_client\"\n```\n\nMake sure you run the alias from the `rancher-cli` repo.\n\n## Commands\n\nThe default `entrypoint.sh` script contains the following CLI commands.\n\n#### upgrade\n\nUsed to upgrade services. Services must be in an \"active\" state to be ugpraded.\n\nUsage:\n\n`rancher-client upgrade [confirm] \u003cenvironment\u003e \u003cstack\u003e \u003ctag\u003e \u003cservice\u003e [service...]`\n\n#### rollback\n\nUsed to rollback services. Services must be in an \"upgraded\" state to be rolled\nback. If a service has already finish the upgrade, then use ugprade again to\nchange the image tag.\n\n`rancher-client rollback \u003cenvironment\u003e \u003cstack\u003e \u003cservice\u003e [service...]`\n\n#### rancher\n\nPassthrough command to the rancher cli.\n\n`rancher-client rancher`\n\n#### test\n\nUsed to run container test suite.  Currently unused.\n\n`rancher-client test`\n\n#### bash\n\nPassthrough to bash prompt.  Useful for debugging, etc.\n\n`rancher-client bash`\n\n#### help\n\nPrint CLI help.\n\n```bash\n$ rancher-client help\nUsage: entrypoint.sh \u003cupgrade|rollback|rancher|test|help|bash\u003e [options]\n\n    upgrade     Upgrade a service to a new image tag\n    rollback    Roll back a service in an upgraded state\n    rancher     Run commands directly using the Rancher CLI\n    help        Display this help\n\n    bash        Drop into a bash shell\n    test        Run the test suite\n\nRead the docs at https://github.com/aboutdotme/rancher-client/ for more details.\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutdotme%2Francher-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboutdotme%2Francher-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutdotme%2Francher-client/lists"}