{"id":13805611,"url":"https://github.com/projectatomic/vagrant-service-manager","last_synced_at":"2025-05-13T19:31:27.621Z","repository":{"id":59158998,"uuid":"51367450","full_name":"projectatomic/vagrant-service-manager","owner":"projectatomic","description":"To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.","archived":true,"fork":false,"pushed_at":"2017-02-03T08:43:55.000Z","size":389,"stargazers_count":18,"open_issues_count":41,"forks_count":16,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-04T06:36:50.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectatomic.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-09T13:12:07.000Z","updated_at":"2023-01-28T20:18:29.000Z","dependencies_parsed_at":"2022-09-13T20:03:19.039Z","dependency_job_id":null,"html_url":"https://github.com/projectatomic/vagrant-service-manager","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectatomic%2Fvagrant-service-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectatomic%2Fvagrant-service-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectatomic%2Fvagrant-service-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectatomic%2Fvagrant-service-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectatomic","download_url":"https://codeload.github.com/projectatomic/vagrant-service-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254012971,"owners_count":21999346,"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":[],"created_at":"2024-08-04T01:01:03.016Z","updated_at":"2025-05-13T19:31:27.121Z","avatar_url":"https://github.com/projectatomic.png","language":"Ruby","funding_links":[],"categories":["Notable plugins"],"sub_categories":[],"readme":"= vagrant-service-manager\n:toc:\n:toc-placement!:\n\nThe vagrant-service-manager plugin is designed to enable\neasier access to the features and services provided by the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle[Atomic\nDeveloper Bundle (ADB)]. It provides setup information, including\nenvironment variables and certificates, required to access services\nprovided by the ADB and is a must have for most ADB users. +\n +\nThis plugin makes it easier to use the ADB with host-based tools such as\nEclipse and the docker and kubernetes CLI commands. Details on how to\nuse ADB with this plugin can be found in the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/using.adoc[ADB\nDocumentation].\n\n'''\ntoc::[]\n'''\n\n== Status\n\n[[img-build-status]]\nimage::https://ci.centos.org/buildStatus/icon?job=vagrant-service-manager[link=\"https://ci.centos.org/job/vagrant-service-manager\"]\n\n== Installation\n\nThe vagrant-service-manager plugin is distributed as a Ruby Gem.\nThe https://rubygems.org/gems/vagrant-service-manager[gem] is available on\nhttps://rubygems.org[RubyGems] and can be installed via the standard\nVagrant plugin installation method:\n\n------------------------------------------------\n$ vagrant plugin install vagrant-service-manager\n------------------------------------------------\n\nNOTE: To resolve any issues with the plugin installation and for more information on how to install Vagrant on various systems, refer to the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.adoc[ADB installation instructions].\n\n== Usage\n\n=== Example execution of the plugin\n\n1.  Install vagrant-service-manager plugin:\n+\n----------------------------------------------\nvagrant plugin install vagrant-service-manager\n----------------------------------------------\n\n1.  Download the relevant Vagrantfile for your\nhttps://github.com/projectatomic/adb-atomic-developer-bundle[ADB]\nvagrant box, from the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle/tree/master/components/centos[repository].\nFor further details on the usage of custom Vagrantfiles designed for\nspecific use cases, refer to the Download ADB section in the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.adoc[Installing ADB] Documentation.\n\n1.  Start the ADB vagrant box using `vagrant up`. For detailed\ninstructions consult the\nhttps://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.adoc[Installation\nDocumentation].\n+\nNOTE: When the vagrant-service-manager plugin is loaded and an ADB box is\nstarted using the VirtualBox provider, the user needs to add a routable\nnon NAT network interface declaration in the Vagrantfile. If the user\ndoes not provide a network declaration in the Vagrantfile, a private\nDHCP network is added by default and a warning is displayed.\n\n1.  Run the plugin to get the environment variables and certificates:\n+\n----------------------------------------------------------------------------\n$ vagrant service-manager env docker\n# Set the following environment variables to enable access to the\n# docker daemon running inside of the vagrant virtual machine:\nexport DOCKER_HOST=tcp://172.28.128.182:2376\nexport DOCKER_CERT_PATH=/foo/bar/.vagrant/machines/default/virtualbox/docker\nexport DOCKER_TLS_VERIFY=1\nexport DOCKER_API_VERSION=1.20\n\n# run following command to configure your shell:\n# eval \"$(vagrant service-manager env docker)\"\n----------------------------------------------------------------------------\n+\nNOTE: The required TLS certificates are copied to the host machine at\nthe time of `vagrant up` itself. Every run of\n`vagrant service-manager env docker` checks for the validity of the\ncertificates on the host machine by matching the certificates inside the\nVM. If the certificates on the host machine are invalid, this command\nwill also re-download the certificates onto the host machine.\n\n=== Available commands\n\nFor a detailed list of all available commands and their explanations refer\n to the link:commands.adoc[Commands Document]. +\nThe following section lists the high level commands available for the plugin.\nwhich enable you to set up your environment variables and get the TLS\ncertificates to secure the Docker communication channel; identify the\nroutable ip address as well as the version of your VM and manage the life\ncycle of the configured services.\n\n- `vagrant service-manager [command] [--help | -h]` +\nDisplays the possible commands, options and other relevant information\nfor the vagrant-service-manager plugin.\n\n-  `vagrant service-manager env [service] [--script-readable]` +\nDisplays connection information for all active services in the VM, in a\nmanner that can be evaluated in a shell.\n\n-  `vagrant service-manager box [command] [--script-readable]` +\nDisplays VM related information like release version, IP, etc.\n\n-  `vagrant service-manager [operation] [service]` +\nManages the life cycle of a service.\n\n- `vagrant service-manager install-cli [service]` +\nInstalls the client binary for the specified service.\n\n[[debug-flag]]\n==== Debug Flag\n\nAppend `--debug` flag to enable debug mode.\n\nNOTE: Debug output from `vagrant-service-manager` is prepended with\nthe following string:\n`DEBUG command: [ service-manager: \u003ccommand name / log message\u003e ]`\n\n=== Exit codes\n\nThe following table lists the plugin's exit codes and their meaning:\n\n[cols=\",\",options=\"header\",]\n|=======================================================================\n|Exit Code Number |Meaning\n|`0` |No error\n\n|`1` |Catch all for general errors / Wrong sub-command or option given\n\n|`3` |Vagrant box is not running and should be running for this command\nto succeed\n\n|`126` |A service inside the box is not running / Command invoked cannot\nexecute\n|=======================================================================\n\n=== IP address detection\n\nThere is no standardized way of detecting Vagrant box IP addresses. This\ncode uses the last IPv4 address available from the set of configured\naddresses that are _up_. i.e. if eth0, eth1, and eth2 are all up and\nhave IPv4 addresses, the address on eth2 is used.\n\n=== HTTP Proxy Settings\n\nIn an environment where the HTTP traffic needs to pass through an\nHTTP proxy server, set the `proxy`, `proxy_user` and\n`proxy_password` proxy configurations in the Vagrantfiles to enable\nservices like Docker and OpenShift to function correctly. +\nYou can do so via:\n +\n-----\nconfig.servicemanager.proxy = \"\u003cProxy URL\u003e\"\nconfig.servicemanager.proxy_user = \"\u003cProxy user name\u003e\"\nconfig.servicemanager.proxy_password = \"\u003cProxy user password\u003e\"\n-----\n\nWhen these settings are applied, they are passed through to the Docker and OpenShift services. In an unauthenticated proxy environment, the `proxy_user` and `proxy_password` configurations can be omitted.\n\nNOTE: `http_proxy`, `http_proxy_user` and `http_proxy_password` have been depreacted now.\n\n=== Configuring Services\nThe vagrant-service-manager helps you configure the service of your choice:\n\n. Enable the desired service(s) in the ADB Vagrantfile as:\n+\n`config.servicemanager.services = \"openshift\"`\n+\n[NOTE]\n====\n- Docker is the default service for the Atomic Developer Bundle and does not require any configuration to ensure it is started whereas, the Red Hat Enterprise Linux Container Development Kit, which is based on ADB, automatically starts OpenShift. +\n- You can use a comma-separated list to enable multiple services. For instance: docker, openshift.\n====\n\n. Enable the relevant option for the services you have selected in the Vagrantfile. For example, specific versions of OpenShift can be set using the following variables:\n+\n\n- `config.servicemanager.openshift_docker_registry = \"docker.io\"` - Specifies the registry from where the OpenShift image is pulled.\n+\n- `config.servicemanager.openshift_image_name = \"openshift/origin\"` - Specifies the image to be used.\n+\n- `config.servicemanager.openshift_image_tag = \"v1.3.0\"` - Specifies the version of the image to be used.\n\n\n== Development\n\n=== Setup\n\n1. After cloning the repository, install the http://bundler.io/[Bundler]\ngem:\n+\n---------------------\n$ gem install bundler -v 1.12.5\n---------------------\n+\nNOTE: You need to specify version 1.12.5. It will not work with the latest version of Bundler.\n\n\n1. Then setup your project dependencies:\n+\n----------------\n$ bundle install\n----------------\n\n1. The build is driven via `rake`. All build related tasks should be executed\nin the Bundler environment, for example `bundle exec rake clean`. You can get a\nlist of available Rake tasks via:\n+\n---------------------\n$ bundle exec rake -T\n---------------------\n\n=== Code style\n\nAs most other open-source projects, vagrant-service-manager has a set of conventions\nabout how to write code for it. It follows the\nhttps://github.com/bbatsov/ruby-style-guide[Ruby Style Guide].\n\nYou can verify that your changes adhere to this style using the\n http://batsov.com/rubocop[RuboCop] Rake task:\n\n--------------------------\n$ bundle exec rake rubocop\n--------------------------\n\n=== Unit tests\n\nThe source contains a set of http://ruby-doc.org/stdlib-2.0.0/libdoc/minitest/rdoc/MiniTest.html[Minitest]\nunit tests. They can be run as follows:\n\nTo run the entire test suite:\n\n------------------------\n$ bundle exec rake test\n------------------------\n\nTo run a single test:\n\n-------------------------------------------------\n$ bundle exec rake test TEST=\u003cpath to test file\u003e\n-------------------------------------------------\n\n=== Acceptance tests\n\nThe source also contains a set of https://cucumber.io/[Cucumber]\nacceptance tests. They can be run via:\n\n---------------------------\n$ bundle exec rake features\n---------------------------\n\nYou can run a single feature specifying the path to the feature file\nto run via the _FEATURE_ environment variable:\n\n-----------------------------------------------------------------------\n$ bundle exec rake features FEATURE=features/\u003cfeature-filename\u003e.feature\n-----------------------------------------------------------------------\n\nNOTE: These Cucumber tests do not run on Windows, pending resolution of\nhttps://github.com/projectatomic/vagrant-service-manager/issues/213[Issue #213].\n\n==== Controlling virtualization provider and box type via _PROVIDER_ and _BOX_ environment variables\n\nPer default, only the scenarios for ADB in combination with the\nVirtualBox provider are run. However, you can also run the tests against CDK\nand/or use the Libvirt provider using the environment variables _BOX_\nand _PROVIDER_ respectively:\n\n-----------------------------------------------------\n# Run tests against CDK using Libvirt\n$ bundle exec rake features BOX=cdk PROVIDER=libvirt\n\n# Run against ADB and CDK (boxes are comma separated)\n$ bundle exec rake features BOX=cdk,adb\n\n# Run against ADB and CDK using VirtualBox and Libvirt\n$ bundle exec rake features BOX=cdk,adb PROVIDER=libvirt,virtualbox\n-----------------------------------------------------\n\n==== Test boxes\n\nThe _features_ task will transparently download the required Vagrant\nboxes and cache them in the _.boxes_ directory. The cache can be cleared\nvia the _clean_boxes_ task. For implementation details refer to the\nhttps://github.com/projectatomic/vagrant-service-manager/blob/master/Rakefile[Rakefile].\n\nUsing the variable _NIGHTLY=true_ you can make sure that the\nlatest nightly build of the CDK is used (VPN access required).\n\n--------------------------------------------------\n# Uses the latest nightly build of the CDK instead of the latest public release as per developer.redhat.com\n$ bundle exec rake features BOX=cdk NIGHTLY=true\n--------------------------------------------------\n\nNOTE: Per default the latest public release of the CDK is used.\n\n==== Cucumber tags\n\nSome of the scenarios take a long time to run, so in order to keep the\nturn-around time on the development machine acceptable, we also make\nuse of the _@ci-only_ https://github.com/cucumber/cucumber/wiki/Tags[tag].\n\nPer default scenarios annotated with _@ci-only_ are only run on the\nhttps://ci.centos.org/job/vagrant-service-manager[CI server]. Also, to run these tests locally,\nyou need to activate the _all_ profile:\n\n--------------------------------------------------\nbundle exec rake features CUCUMBER_OPTS='-p all'\n--------------------------------------------------\n\nFor other defined profiles refer to Cucumber config file https://github.com/projectatomic/vagrant-service-manager/blob/master/.config/cucumber.yml[cucumber.yml].\n\n==== Cucumber test reports\n\nAfter test execution, the Cucumber test reports can be found under\n_build/features_report.html_. They can be opened via:\n\n---------------------------------------\n$ bundle exec rake features:open_report\n---------------------------------------\n\n=== Asciidoc\n\nThe documentation of this plugin is written in http://asciidoctor.org[Asciidoc]. If you need some syntax help,\nrefer to the http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[AsciiDoc Syntax Quick Reference].\n\nTo build the documentation you can execute\n\n----\n$ bundle exec rake html\n----\n\nwhich will build the HTML documentation into the folder _build/html_.\n\nThe source code also contains a link:Guardfile[Guardfile] for the https://github.com/guard/guard[Guard] library.\nYou can execute\n\n----\n$ bundle exec guard\n----\n\nand your HTML documentation will be automatically updated on each change to an Asciidoc source file.\nhttps://github.com/guard/guard-livereload[Live reload] is also enabled, so you just need to install the right\nhttp://livereload.com/extensions/#installing-sections[LiveReload Safari/Chrome/Firefox extension] and your\nbrowser will refresh the page each time you save a change to your Asciidoc files.\n\n== Getting involved\n\nWe welcome your input. You can submit issues or pull requests with\nrespect to the vagrant-service-manager plugin. Refer to the\nhttps://github.com/projectatomic/vagrant-service-manager/blob/master/CONTRIBUTING.adoc[contributing\nguidelines] for detailed information on how to contribute to this\nplugin.\n\nYou can contact us on:\n\n* IRC: #atomic and #nulecule on freenode\n* Mailing List: container-tools@redhat.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectatomic%2Fvagrant-service-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectatomic%2Fvagrant-service-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectatomic%2Fvagrant-service-manager/lists"}