{"id":15580490,"url":"https://github.com/toabctl/jcs","last_synced_at":"2026-05-05T22:37:01.970Z","repository":{"id":71945223,"uuid":"238849078","full_name":"toabctl/jcs","owner":"toabctl","description":"Jenkins cloud slave","archived":false,"fork":false,"pushed_at":"2020-06-23T14:28:14.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T18:12:38.611Z","etag":null,"topics":["aws","ci","cloud","ec2","jenkins","openbuildservice"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toabctl.png","metadata":{"files":{"readme":"README.rst","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-07T05:14:28.000Z","updated_at":"2020-06-23T14:28:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"29493100-d439-4216-b23d-41b45ff1d21f","html_url":"https://github.com/toabctl/jcs","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/toabctl%2Fjcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fjcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fjcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fjcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toabctl","download_url":"https://codeload.github.com/toabctl/jcs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243672487,"owners_count":20328768,"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":["aws","ci","cloud","ec2","jenkins","openbuildservice"],"created_at":"2024-10-02T19:28:22.082Z","updated_at":"2026-05-05T22:37:01.945Z","avatar_url":"https://github.com/toabctl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Jenkins Cloud Slave (jcs)\n-------------------------\n\n`Jenkins Cloud Slave`_ is a command line interface to create\n`Jenkins`_ slave servers. With that, new Jenkins slaves can\nbe dynamically created eg. on public clouds (AWS) or private\nclouds (OpenStack).\n\nInstallation\n============\n\nYou can install `jcs` inside of a virtualenv::\n\n  virtualenv venv\n  source venv/bin/activate\n  pip install git+git://github.com/toabctl/jcs.git#egg=jcs[aws,obs,jenkins]\n\nUsage\n=====\nSome examples how to use `jcs`. All the following calls to `jcs`\nexpect that some environment variables are set (the parameters\ncan also be given as CLI switches, eg. `--jenkins-url` but for\nshorter commands, we use the env vars here).\n\nFor Jenkins::\n\n  export JENKINS_URL=https://localhost\n  export JENKINS_USERNAME=user\n  export JENKINS_PASSWORD=superSecure!\n\nWhen doing something with AWS, also these are needed::\n\n  export AWS_ACCESS_KEY_ID=my-access-key\n  export AWS_SECRET_ACCESS_KEY=my-secret-access-key\n\nWhen doing something with OpenStack::\n\n  export OS_CLOUD=my-cloud\n\nwhere `my-cloud` needs to be defined in the `clouds.yaml` file.\n\nAll-in-one - Create a Jenkins slave on AWS/EC2 from an OBS image\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\nAssuming you have an EC2-ready image on the `OpenBuildService`_ (OBS) that you\nwant to use as a jenkins slave, do::\n\n  jcs create --key-name my-keypair-name --jenkins-credential cred-description \\\n      http://download.suse.de/ibs/Devel:/Storage:/images/openSUSE_Leap_15.1/minimal-openSUSE-Leap-15.1.aarch64-ec2-hvm.raw.xz \\\n      jenkins-slave-name\n\nWhere `--key-name` is the key that must be available on the cloud\nto be able to login into the instance. `--jenkins-credential` is the\ncredential that is registered inside the Jenkins master. Here, use the\ndescription of the credential (not the ID).\nThe image from OBS is only downloaded once and cached in `~/.cache/jcs`.\nThe image will only downloaded again, if the sha256 changed.\n\nTo delete the whole stack (Jenkins node and EC2 instance), do::\n\n  jcs delete jenkins-slave-name\n\nNote: This only works if the slave got created with `jcs create` because\nit uses EC2 tags to build the relation between the jenkins slave name\nand the EC2 instance.\n\nAdd node as Jenkins slave\n+++++++++++++++++++++++++\n\nIf you already have a node that should be registered as a Jenkins slave,\nall you need are Jenkins credentials (for creating the node in Jenkins),\nsome node information and a Jenkins credential (to log into the node)::\n\n  export JENKINS_URL=https://localhost\n  export JENKINS_USERNAME=user\n  export JENKINS_PASSWORD=superSecure!\n\n  jcs jenkins-node-add my-slave-hostname-or-ip slave-name \"slave description\" \\\n    slave-credentials \"label1 label2\"\n\n* The `slave_credentials` needs to be the \"credential description\" (not the ID).\n  This is a `limitation`_ of `jenkinsapi`_ which is used to talk to Jenkins.\n* Instead of using the `JENKINS_*` enviroment variables, command line switches\n  (`--jenkins-url`, `--jenkins-username` and `--jenkins-password`) are also\n  available. See `jcs -h`.\n\nRemove node as Jenkins slave\n++++++++++++++++++++++++++++\n\nSimilar to `jenkins-node-add`, removing the node can be done with::\n\n  jcs jenkins-node-remove slave-name\n\nThe environment variables (`JENKINS_*`) or command line switches (`--jenkins-*`)\nmust be set when executing this command.\n\nDownload an OBS image\n++++++++++++++++++++\n\nDownloading an image from OBS::\n\n  jcs obs-image-download http://download.suse.de/ibs/Devel:/Storage:/images/openSUSE_Leap_15.1/minimal-openSUSE-Leap-15.1.x86_64-ec2-hvm.raw.xz\n\nThe downloaded images are cached under `~/.cache/jcs`.\n\n.. _`Jenkins Cloud Slave`: https://github.com/toabctl/jcs\n.. _`Jenkins`: https://jenkins.io/\n.. _`jenkinsapi`: https://github.com/pycontribs/jenkinsapi\n.. _`limitation`: https://github.com/pycontribs/jenkinsapi/issues/766\n.. _`OpenBuildService`: https://openbuildservice.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoabctl%2Fjcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoabctl%2Fjcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoabctl%2Fjcs/lists"}