{"id":21888622,"url":"https://github.com/swisscom/dopv","last_synced_at":"2025-07-21T10:31:16.083Z","repository":{"id":18691749,"uuid":"85067951","full_name":"swisscom/dopv","owner":"swisscom","description":"Deployment Orchestrator for Puppet VM provisioning","archived":false,"fork":false,"pushed_at":"2023-04-07T11:58:51.000Z","size":370,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-05-17T05:22:14.226Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swisscom.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-15T12:08:47.000Z","updated_at":"2022-01-24T14:54:08.000Z","dependencies_parsed_at":"2022-08-07T09:00:53.243Z","dependency_job_id":null,"html_url":"https://github.com/swisscom/dopv","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fdopv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fdopv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fdopv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fdopv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisscom","download_url":"https://codeload.github.com/swisscom/dopv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226902943,"owners_count":17700619,"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-11-28T11:16:14.277Z","updated_at":"2024-11-28T11:16:15.154Z","avatar_url":"https://github.com/swisscom.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]\n\u003e DEPRECATED - no longer maintained!\n\n# Dopv\n\nDopv orchestrates deployments of nodes. A node can be a virtual machine or a bare-metal compute node.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'dopv'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install dopv\n\n## Usage\n\n### Library\nDeploy a plan\n```ruby\nrequire 'dopv'\nplan = ::Dopv::load_plan(plan_file)\ndata_volumes_db = ::Dopv::load_data_volumes_db(db_file)\n::Dopv::run_plan(plan, data_volumes_db)\n```\nUndeploy a plan while keeping data volumes\n```ruby\nrequire 'dopv'\nplan = ::Dopv::load_plan(plan_file)\ndata_volumes_db = ::Dopv::load_data_volumes_db(db_file)\n::Dopv::run_plan(plan, data_volumes_db, :undeploy)\n```\nUndeploy a plan and remove data volumes from infrastructure provider (stack) as\nwell as from persistent data volumes DB:\n```ruby\nrequire 'dopv'\nplan = ::Dopv::load_plan(plan_file)\ndata_volumes_db = ::Dopv::load_data_volumes_db(db_file)\n::Dopv::run_plan(plan, data_volumes_db, :undeploy, true)\n```\n\n### CLI\nA command line interface utility `dopv` is provided.\n\n#### Getting help\nA help can be obtained by calling `dopv --help`:\n```\n$ dopv --help\nNAME\n    dopv - DOPv command line tool\n\nSYNOPSIS\n    dopv [global options] command [command options] [arguments...]\n\nVERSION\n    0.14.0\n\nGLOBAL OPTIONS\n    --help                    - Show this message\n    --log_dir=LOGDIR          - Directory for the log files (default: $home/.dop/log)\n    --log_level, -l LOGLEVEL  - Log level for the logfiles (default: DEBUG)\n    --plan_store_dir, -s DIR  - Specify the directory where the plans and their state will be stored (default: $home/.dop/cache)\n    --[no-]trace, -t          - Show stacktrace on crash\n    --verbosity, -v Verbosity - Verbosity of the command line tool (default: INFO)\n    --version                 - Display the program version\n\nCOMMANDS\n    add      - Add a new plan file to the plan store\n    deploy   - Deploy a plan.\n    export   - Export the internal data disks state into a local file\n    help     - Shows a list of commands or help for one command\n    import   - Import data disks from a file into internal state store of the given plan\n    list     - List plans stored in the plan store\n    refresh  - Refresh a plan.\n    remove   - Remove existing plan from the plan store\n    undeploy - Undeploy a plan.\n    update   - Update the plan and/or the plan state for a given plan yaml or plan name.\n    validate - Validate a plan file.\n```\n\n#### Validating a plan\nThe deployment plan `/tmp/foo_plan.yml` could be validated by issuing:\n```\n$ dopv validate -p /tmp/foo_plan.yml\nPlan valid.\n```\n\nPlease note that the plan is always validated before any action takes place.\n\n#### Adding a plan\nIn order to add a plan to plan cache, use `dopv` `add` command:\n```\n$ dopv add /tmp/bar_plan.yml\n```\n\nPlease note that this feature is considered experimental and should be used with extreme care.\n\n#### Updating a plan\nIn order to update a plan in the cache after some local changes have been introduced, use `dopv`\n`update` command:\n```\n$ dopv update /tmp/bar_plan.yml\n```\n\nOne may use `-c` or `-i` in order to remove the existing disk information and start with a clean\nstate or to ignore the update and to merely set it to the latest version.\n\nPlease note that this feature is considered experimental and should be used with extreme care.\n\n#### Listing plans in cache\nOne may use the `list` command to check which plans are stored in the plan cache.\n\n#### Deploying a plan\nTo get a help on deploy CLI options launch `dopv help deploy` argument:\n```\n$ dopv help deploy\nNAME\n    deploy - Deploy a plan\n\nSYNOPSIS\n    dopv [global options] deploy [command options]\n\nCOMMAND OPTIONS\n    --diskdb, -d path_to_db_file                                             - Use a local diskdb file and import/export it automatically (default: none)\n    --exclude_nodes=node01.example.com,node02.example.com,/example\\.com$/    - Exclude this nodes from the run (default: )\n    --exclude_nodes_by_config='{\"var1\": [\"val1\", \"/val2/\"], \"var2\": \"val2\"}' - Exclude nodes with this config from the run (You have to specify a JSON hash here) (default: {})\n    --exclude_roles=role01,role01,/^rolepattern/                             - Exclude this roles from the run (default: )\n    --nodes=node01.example.com,node02.example.com,/example\\.com$/            - Run plans for this nodes only (default: )\n    --nodes_by_config='{\"var1\": [\"val1\", \"/val2/\"], \"var2\": \"val2\"}'         - Run plans for this nodes with this config only (You have to specify a JSON hash here) (default: {})\n    --plan, -p path_to_plan_file                                             - plan name from the store or plan file to deploy. If a plan file is given DOPv will run in oneshot mode and add/remove\n                                                                               the plan automatically to the plan store (required, default: none)\n    --roles=role01,role01,/^rolepattern/                                     - Run plans for this roles only (default: )\n```\nTo deploy a plan located at `/tmp/plan.yaml` and store and/or load persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:\n```\n$ dopv deploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml\n```\n\nTo deploy only nodes matching a regular expression `^foo-[1-9]+\\.bar\\.baz$` that are defined in a plan called `/tmp/plan.yaml` and store and/or load persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:\n```\n$ dopv deploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml --nodes=/^foo-[1-9]+\\.bar\\.baz$/\n```\n\nPlease note that disk database file is created if it does not exist.\n\n#### Undeploying a plan\nTo get a help on undeploy CLI options launch `dopv` `help undeploy` argument:\n```\n$ dopv help undeploy\nNAME\n    undeploy - Undeploy a plan\n\nSYNOPSIS\n    dopv [global options] undeploy [command options]\n\nCOMMAND OPTIONS\n    --diskdb, -d path_to_db_file - (default: none)\n    --plan, -p path_to_plan_file - (required, default: none)\n ME\n    undeploy - Undeploy a plan\n\nSYNOPSIS\n    dopv [global options] undeploy [command options]\n\nCOMMAND OPTIONS\n    --diskdb, -d path_to_db_file                                             - Use a local diskdb file and import/export it automatically (default: none)\n    --exclude_nodes=node01.example.com,node02.example.com,/example\\.com$/    - Exclude this nodes from the run (default: )\n    --exclude_nodes_by_config='{\"var1\": [\"val1\", \"/val2/\"], \"var2\": \"val2\"}' - Exclude nodes with this config from the run (You have to specify a JSON hash here) (default: {})\n    --exclude_roles=role01,role01,/^rolepattern/                             - Exclude this roles from the run (default: )\n    --nodes=node01.example.com,node02.example.com,/example\\.com$/            - Run plans for this nodes only (default: )\n    --nodes_by_config='{\"var1\": [\"val1\", \"/val2/\"], \"var2\": \"val2\"}'         - Run plans for this nodes with this config only (You have to specify a JSON hash here) (default: {})\n    --plan, -p path_to_plan_file                                             - plan name from the store or plan file to undeploy. If a plan file is given DOPv will run in oneshot mode and\n                                                                               add/remove the plan automatically to the plan store (required, default: none)\n    --[no-]rmdisk, -r                                                        - Remove the disks\n    --roles=role01,role01,/^rolepattern/                                     - Run plans for this roles only (default: )   --[no-]rmdisk, -r            -\n```\n\nIn order to destroy a deployment specified by a plan located at `/tmp/plan.yaml` and persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:\n```\n$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml\n```\nIf you also want to remove the data volumes of each node and remove their records from persistent data volumes DB, please specify `-r` or `--rmdisk` option as shown bellow:\n```\n$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r\n```\nIf you'd like to selectively remove a node called `foo.bar.baz` as well as nodes that match regular expression `^foo[1-5]\\.bar\\.baz$` and their data disks, you would use `--nodes` filter:\n```\n$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r --nodes=foo.bar.baz,/^foo[1-5]\\.bar\\.baz$/\n```\nIf you'd like to remove all nodes but those matching `foo.bar.baz` as well as nodes that match regular expression `^foo[1-5]\\.bar\\.baz$` and their data disks, you would use `--exclude_nodes` filter:\n```\n$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r --exclude_nodes=foo.bar.baz,/^foo[1-5]\\.bar\\.baz$/\n```\n\n#### Logging\nBy default `dopv` logs messages with `INFO` level and higher to standard output. In order to log to a file `-l` can be specified. The `-v` option is used to set a different log threshold. Following is an example of logging everything (`DEBUG` and above) into `/tmp/dopv.log` during plan deployment:\n```\n$ dopv -l /tmp/dopv.log -v debug deploy -p /tmp/plan.yaml -d /tmp/disks.yaml\n```\n\n## Node Filtering Notes\nPlease note that `dopv` filtering by configuration and roles is not yet supported.\n\n## Plan\nA plan format and description can be found [here](https://github.com/swisscom/dop_common/blob/master/doc/plan_format_v0.0.1.md). A plan example can be found [here](https://github.com/swisscom/dop_common/blob/master/doc/plan_format_v0.0.1.md)\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fdopv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisscom%2Fdopv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fdopv/lists"}