{"id":21535379,"url":"https://github.com/ssc-services/samutev","last_synced_at":"2026-04-18T10:35:59.856Z","repository":{"id":54225956,"uuid":"311271864","full_name":"ssc-services/samutev","owner":"ssc-services","description":"script to deploy quickly local test vm's using multipass, as masterless minion test vm's or even joined to a saltstack master test vm","archived":false,"fork":false,"pushed_at":"2023-08-18T05:48:32.000Z","size":84,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-27T17:17:01.750Z","etag":null,"topics":["master","masterless","minion","multipass","salt","saltstack"],"latest_commit_sha":null,"homepage":"","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/ssc-services.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-09T08:31:03.000Z","updated_at":"2023-08-18T05:48:37.000Z","dependencies_parsed_at":"2025-10-17T09:33:51.648Z","dependency_job_id":"b972fbc1-90fa-4b27-b114-1aa0489e1188","html_url":"https://github.com/ssc-services/samutev","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ssc-services/samutev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssc-services%2Fsamutev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssc-services%2Fsamutev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssc-services%2Fsamutev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssc-services%2Fsamutev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssc-services","download_url":"https://codeload.github.com/ssc-services/samutev/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssc-services%2Fsamutev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["master","masterless","minion","multipass","salt","saltstack"],"created_at":"2024-11-24T03:15:01.473Z","updated_at":"2026-04-18T10:35:59.835Z","avatar_url":"https://github.com/ssc-services.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- TOC --\u003e\n\n- [1. samutev: Salt Multipass Test Vm's](#1-samutev-salt-multipass-test-vms)\n    - [1.1. requirements](#11-requirements)\n    - [1.2. configuration](#12-configuration)\n    - [1.3. usage](#13-usage)\n        - [1.3.1. gcp](#131-gcp)\n        - [1.3.2. multipass](#132-multipass)\n    - [1.4. some details](#14-some-details)\n        - [1.4.1. directories](#141-directories)\n        - [1.4.2. vm defaults](#142-vm-defaults)\n        - [1.4.3. multipass](#143-multipass)\n        - [1.4.4. gcp](#144-gcp)\n        - [1.4.5. performance](#145-performance)\n\n\u003c!-- /TOC --\u003e\n\n# 1. samutev: Salt Multipass Test Vm's\n\nsamutev helps you to deploy [quickly](#145-performance) local test vm's using multipass.\n\nTest-vm's can be deployed either as masterless minion or as a master with minions.  \nThe resulting test-vm's are preconfigured with working saltstack.  \nInside the test-vm's the salt directories are mapped to /srv/salt/*  \n\n## 1.1. requirements\n- a [salt-repo-base-directory ($salt_base)](#12-configuration) with cloned repos `salt-states` and `salt-pillars` of your project inside\n- __ubuntu__ 20.04\n- __multipass__ (`apt install snapd; snap install multipass`)\n- enough __space__ for created vm-disks in `/var`\n- enough __memory__ for created vm's - according to application needs\n- __internet__ connection (for things like package install)  \n- In case of a __vmware-vm__ as multipass host, following settings are needed:  \n  ![settings vmware-vm](images/vmware_setting.png)\n- In case you want to use __\"Google Cloud\"__ as a provider backend you need:\n  - An account and a project in GCP (with allocated budget)\n  - The gcloud cli utility installed (`snap install google-cloud-sdk --classic`)\n  - Some additional dependencies installed (`apt-get install -y nfs-kernel-server portmap autossh`)\n  - Gcloud configured to use the correct account/project (core/account property): (`gcloud init`)\n\n## 1.2. configuration\n\nIf you are working first time with samutev, do once `cp samutev.conf.template samutev.conf`\n\nIn `samutev.conf` customize these settings to your need:\n1. `salt_base=\"\"`  \nshould be the directory of your salt project, where git repos `salt-states` and `salt-pillars` reside\n2. `my_ssh_pub_key=\"\"`   \nused to deploy the ssh-pub-key to each launchend vm to `root` and to the normal user `user`. So you do `ssh root@\u003cvm-ip\u003e` or `ssh user@\u003cvm-ip\u003e`\n\nFurther, in `samutev.conf` you can customize [cloudinit](https://cloudinit.readthedocs.io/en/latest/) to bootstrap the vms.\n\nIf you intend to use the GCP provider backend you also need to customize \n1. `my_ssh_pub_key=\"\"`  \nshould be the public SSH key you want to use to connect to the instances\n2. `DEFAULT_GCP_ZONE` and `FALLBACK_GCP_MACH_TYPE`   \nshould not be modified unless you know what/why you are doing \n\n## 1.3. usage\n\n### 1.3.1. gcp\nSee section `multipass` - only the default values displayed differ a little.\nTo use provider `gcp` instead of the default (`multipass`) just prefix the script with `PROVIDER=gcp`:\n```\nPROVIDER=gcp ./samutev.sh -h \n```\n\n### 1.3.2. multipass\n```\nUsage:\n  ./samutev.sh -h                        display this help message\n  ./samutev.sh [-r \u003crelease\u003e] -n \u003cVM\u003e    new    \u003cVM\u003e with masterless minion\n  ./samutev.sh [-r \u003crelease\u003e] -s \u003cVM\u003e    new    \u003cVM\u003e with minion and salt master, first vm =\u003e saltmaster, minimum of 2 vms\n  ./samutev.sh -d \u003cVM\u003e                   delete \u003cVM\u003e\n  ./samutev.sh -l                        list vms\n\n                                         \u003crelease\u003e: default is 'lts' aliased to 'focal'\n                                         Other available options are:\n                                           - 16.04 (or xenial)\n                                           - 18.04 (or bionic)\n                                           - 20.04 (or focal or lts)\n\nExamples:\n  ./samutev.sh -n  testvm                                 launch new testvm            as masterless minion\n  ./samutev.sh -n 'testvm1 testvm2 testvm3'               launch multiple new testvms  as masterless minions\n  ./samutev.sh -n 'testvm1:c2:m1:d3 testvm2:c4:m2'        launch multiple new testvms  as masterless minions\n                                                          with special settings for cpu, memory and disk:\n                                                            - testvm1 with: c2 =\u003e 2 cpu, m1 =\u003e 1GB memory and d3 =\u003e 3GB disk\n                                                            - testvm2 with: c4 =\u003e 4 cpu, m2 =\u003e 2GB memory\n                                                              (defaults are c2 m1 d3)\n\n  ./samutev.sh -s 'salt-master1 testvm1 testvm2 testvm3'  launch a saltmaster with multiple new testvms\n                                                            - First vm = saltmaster\n                                                            - Minimum = 2 vms\n  ./samutev.sh -s 'salt-master1:c2:m2:d6 testvm1'         same as above but with custom resource settings\n\n  ./samutev.sh -d  testvm                                 delaunch/delete testvm\n  ./samutev.sh -d 'testvm1 testvm2 testvm3'               delaunch/delete multiple testvms\n\n```\n\n## 1.4. some details\n\n### 1.4.1. directories\nIn configured `$salt_base` (`samutev.conf`) two directories will be created, if not already there:\n- `localstore/`  -   configured as `file_roots`  \n   place to put states or binaries - outside of git repos\n- `salt-dev-pillars/devpillars.sls`  -    configured as `pillar_roots`  \n   place to put you dev-pillars - outside of git repos\n\nBoth directories will be available either to the salt master or to masterless minions directly\n\n### 1.4.2. vm defaults\n\n### 1.4.3. multipass\ntype | default\n-----|--------\ncpu | 2\nmemory | 1 (GB)\ndisk | 4 (GB)\n\n### 1.4.4. gcp\nType: e2-micro\n\ntype | default\n-----|--------\ncpu | 2\nmemory | 1 (GB)\ndisk | 10 (GB)\n\n\n### 1.4.5. performance\nsome meassured times, create 4 vm's, 1 salt-master and 3 minions:  \n`samutev.sh -s \"project-master project-app project-db project-web\"`  \n\n__multipass__\nenvironment | time\n------------|------\nvm Testcluster (4GB RAM)| 10:49 min\nLenovo x390 (16GB RAM)| 04:27 min\nLenovo T14 AMD (32GB RAM)| 03:45 min\nLenoveo P53 (32GB RAM)| 03:31 min\n\n__gcp__\nenvironment | time\n------------|------\ngoogle cloud| 05:38\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssc-services%2Fsamutev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssc-services%2Fsamutev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssc-services%2Fsamutev/lists"}