{"id":15013891,"url":"https://github.com/yunielrc/vedv","last_synced_at":"2025-04-12T05:50:55.601Z","repository":{"id":161796719,"uuid":"586951626","full_name":"yunielrc/vedv","owner":"yunielrc","description":"A tool for developing in a secure, isolated and reproducible environment","archived":false,"fork":false,"pushed_at":"2023-10-08T14:58:29.000Z","size":1725,"stargazers_count":9,"open_issues_count":31,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T01:12:55.115Z","etag":null,"topics":["ansible","containers","docker","docker-container","docker-image","dockerfile","puppet","terraform","vagrant","virtual-machine","virtualbox","virtualization"],"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/yunielrc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-01-09T16:05:51.000Z","updated_at":"2023-10-22T22:33:52.000Z","dependencies_parsed_at":"2023-10-01T18:58:41.872Z","dependency_job_id":"a34c2309-abf6-426a-830b-9ddaf8b80dee","html_url":"https://github.com/yunielrc/vedv","commit_stats":{"total_commits":330,"total_committers":2,"mean_commits":165.0,"dds":"0.018181818181818188","last_synced_commit":"7769ced6d033c017ad586f9782abe93934c0af10"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunielrc%2Fvedv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunielrc%2Fvedv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunielrc%2Fvedv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunielrc%2Fvedv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunielrc","download_url":"https://codeload.github.com/yunielrc/vedv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525153,"owners_count":21118616,"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":["ansible","containers","docker","docker-container","docker-image","dockerfile","puppet","terraform","vagrant","virtual-machine","virtualbox","virtualization"],"created_at":"2024-09-24T19:44:54.014Z","updated_at":"2025-04-12T05:50:55.578Z","avatar_url":"https://github.com/yunielrc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- DO NOT EDIT THIS FILE; IT WAS GENERATED BY ./tools/update-readme --\u003e\n\u003c!-- EDIT README.md.tpl INSTEAD --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\n    \u003cimg src=\"media/vedv.png\" width=\"96px\" alt=\"ydf\" /\u003e\n\n# vedv\n\n  \u003c/a\u003e\n\n**_A tool for developing in a secure, isolated and reproducible environment_**\n\n**_This is a democratic project not a dictatorship, so you have the freedom to join to it and build the new features you need for the benefit of everyone_**\n\u003c/div\u003e\n\n\u003ca href=\"https://www.producthunt.com/posts/vedv?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-vedv\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=416019\u0026theme=light\" alt=\"vedv - Develop\u0026#0032;in\u0026#0032;a\u0026#0032;secure\u0026#0044;\u0026#0032;isolated\u0026#0032;and\u0026#0032;reproducible\u0026#0032;environment | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\n## Table of Contents\n\nClick on the menu right before `README.md` as shown in the image below.\n\n\u003cimg width=300px  src=\"media/toc.png\" alt=\"toc\"\u003e\n\n## About\n\nThis is a tool for developing applications in a secure, isolated and reproducible environment with virtual machines using a Docker-like workflow.\n\nMany apps are made for desktop environments, others apps rely on systemd, and others technologies that doesn't work well\nin an OCI-compliant container. The software we are developing needs to be tested on a system as close as possible to the one\nwhere it is going to be executed, Sometimes it is very difficult to satisfy the requirements with Docker and we have to\nuse virtual machines missing the docker workflow. This is why I started the development of vedv. I hope you find it useful.\n\n## Tested OS\n\n👉 This tool does not work with nested virtualization, it must be installed and\nexecuted on a real machine. It's tested on the following OS:\n\n### Manjaro\n\nRuntime Dependencies:\n\n```sh\n# SYSTEM: Linux yuniel-pc 6.1.44-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Aug  9 09:02:26 UTC 2023 x86_64 GNU/Linux\n# YAY\nbash 5.1.016-2\npython 3.11.3-2\npython-pip 23.2.1-1\nvirtualbox 7.0.10-1\nopenbsd-netcat 1.225_1-1\nsshpass 1.10-1\npython-pip 23.2.1-1\nlibxml2 2.11.4-1\n# PIP\ndockerfile-parse 2.0.0\npetname 2.6\n```\n\n### Ubuntu\n\nRuntime Dependencies:\n\n```sh\n# SYSTEM: Linux user-MS-7D43 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux\n# APT\nbash 5.1-6ubuntu1\ncurl 7.81.0-1ubuntu1.13\nlibxml2-utils 2.9.13+dfsg-1ubuntu0.3\nnetcat-openbsd 1.218-4ubuntu1\npython3-pip 22.0.2+dfsg-1ubuntu0.3\npython3 3.10.6-1~22.04\nsshpass 1.09-1\nvirtualbox-7.0 7.0.10-158379~Ubuntu~jammy\n# PIP\ndockerfile-parse 2.0.1\npetname 2.6\n\n```\n\n## Install\n\n### From package manager\n\n#### Install on Manjaro\n\n```sh\nsudo pacman -Syu --noconfirm --needed yay \u0026\u0026\n  yay -Sy --noconfirm --needed vedv-git \u0026\u0026\n  sudo pacman -Syu --noconfirm --needed \"$(mhwd-kernel -li | grep -Po '\\(\\Klinux\\d+\\S*(?=\\))')-virtualbox-host-modules\" \u0026\u0026\n  sudo vboxreload\n```\n\n### From git repository\n\nFor installation from source code is required to have installed `git` and `make`.\nIt's recommended to install `bmon` to see the download/upload activity and `vim`\nas text editor.\n\nClone the repository and switch to vedv directory\n\n- from github\n\n```sh\ngit clone https://github.com/yunielrc/vedv.git \u0026\u0026 cd vedv\n```\n\nSelect the last stable version\n\n```sh\ngit checkout \"$(git tag --sort='version:refname' | grep -Po '^v\\d+\\.\\d+\\.\\d+$' | tail -n 1)\"\n```\n\n#### Install on Manjaro\n\n```sh\nmake install-deps-manjaro \u0026\u0026 sudo make install\n```\n\n#### Install on Ubuntu\n\n```sh\nmake install-deps-ubuntu \u0026\u0026 sudo make install\n```\n\n#### Install on any other linux distribution\n\nInstall runtime dependencies manually and run the command below:\n\n```sh\nsudo make install\n```\n\nIt's highly recommended for any other linux distro than manjaro and ubuntu to import and run an image from virtualbox gui before running vedv to guarantee that virtualbox is working properly.\n\nDownload an alpine image\n\n```sh\nwget --header='User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' 'https://onedrive.live.com/download?resid=DBA0B75F07574EAA%21272\u0026authkey=!AP8U5cI4V7DusSg' -qO alpine-inv.ova\n```\n\nImport the image from virtualbox gui:\n\n- Open Virtualbox\n- Click on File menu \u003e Import Appliance\n- Import the image `alpine-inv.ova`\n- Start the `alpine-x86_64` virtual machine\n\nIf you have any problem running vedv on your linux distro, it can be a missing dependency, please open a Bug issue.\n\n## Configure\n\n👉 If you don't see the registration **mail** in your inbox, check the **spam** folder.\n\nRegister at \u003chttps://registry.vedv.dev\u003e\n\n### Create app password\n\n- Go to \u003chttps://registry.vedv.dev/settings/user/security\u003e\n\n- Scroll to the end up to the section: **Devices \u0026 sessions**\n\n \u003cimg width=500px  src=\"media/registry-nextcloud-app-password.png\" alt=\"registry nextcloud app password\"\u003e\n\n- Write on **App Name**: *vedv*\n\n- Click on **Create new app password**\n\n- Copy the generated password\n\n### Set the credentials\n\nCopy the config to your home directory\n\n```sh\ncp /etc/skel/.vedv.env ~\n```\n\nEdit the config, set the registry credentials, save and exit\n\n```sh\ncd \u0026\u0026 vim .vedv.env\n```\n\n## Usage\n\nShow the help\n\n```sh\nvedv --help\n```\n\n```sh\n# command output:\nUsage:\nvedv COMMAND\n\nA tool for developing in a secure and reproducible environment\n\nFlags:\n  -h, --help    show this help\n\nManagement Commands:\n  container     manage containers\n  image         manage images\n  builder       manage builder\n  registry      manage registry\n\nRun 'vedv COMMAND --help' for more information on a command.\n```\n\n### Start a container\n\nDownload an image with custom name, create a container and start it\n\n- To see the download activity, install `bmon`, open it `bmon -b` and select the network interface\n\n```sh\nvedv image pull -n alpine admin@alpine/alpine-3.17.3-x86_64\n# 10.399s 90Mbps --\u003e download + import + creation time\nvedv container create -n alpine alpine\n#  1.660s\n# starting a container can take up to 1 minute the first time or more\n# deppending on your hardware and the image os\nvedv container start -w alpine\n# 13.395s --\u003e startup + sshd service time to be ready\n```\n\nOr download an image and create a container, then start it\n\n```sh\nvedv container create -n alpine admin@alpine/alpine-3.17.3-x86_64\n# starting a container can take up to 1 minute the first time or more\n# deppending on your hardware and the image os\nvedv container start alpine\n```\n\nShow running container\n\n```sh\nvedv container ls\n```\n\n### Login to the container\n\nIf you see the error: `Connection timed out during banner exchange`,\nthe container is starting, wait around 10 seconds and try again.\nTo avoid that you can starts the container with the `--wait` flag\n\nIf you run the login command and the container is stopped, it is started automatically\n\n```sh\n# login to a container can take up to 1 minute the first time or more\n# deppending on your hardware and the image os\nvedv container login alpine\n```\n\nPlay with it :)\n\nExit the container and remove it\n\n```sh\nvedv container rm --force alpine\n```\n\nShow the image and copy its name to remove\n\n```sh\nvedv image ls\n```\n\nRemove the image\n\n```sh\nvedv image rm \u003cyour-image-name\u003e\n```\n\n### Our Application\n\nThis is the sample app from \u003chttps://www.docker.com/101-tutorial/\u003e.\nThanks to Docker.\n\nWe will be working with a simple todo list manager that is running in Node.js.\n\n#### Getting our App\n\nClone the app repository and switch to its directory\n\n- from github:\n\n```sh\ngit clone https://github.com/yunielrc/todo-101.git \u0026\u0026 cd todo-101\n```\n\n#### Building the App's Container Image\n\n- Create a file named  `Vedvfile` in the same folder as the file package.json\n  with the following contents.\n\n```dockerfile\n# Download the image from the registry and import it\nFROM admin@alpine/alpine-3.17.3-x86_64\n# Set the user, create it if doesn't exist and change the owner\n# of WORKDIR recursively\nUSER root\n# Set the working directory and create it if doesn't exist\nWORKDIR /app\n# Run commands on the current working directory\nRUN apk add -U nodejs~18 npm yarn\n# Copy package.json to the current working directory\nCOPY package.json .\n# Copy yarn.lock to the current working directory\nCOPY yarn.lock .\n# Install dependencies\nRUN yarn install --production\n# Copy the service file and set the permissions\nCOPY --chmod 0755 ./root/etc/init.d/todo-101 /etc/init.d/todo-101\n# Add the service to the default runlevel (auto-start on boot)\nRUN rc-update add todo-101\n# Copy the source code to the current working directory\nCOPY . .\n# Start the service\nRUN rc-service todo-101 start\n# Expose port 3000\nEXPOSE 3000/tcp\n```\n\nVedvfile syntax is highly inspired by Dockerfile, but with some differences\n\n- Save the file and exit\n\n- Build it\n\n```sh\nvedv image build -n todo-101-alpine-1.0.0-x86_64\n# 55.360s --\u003e [download] + [import] + creation + startup + build + stop time\n```\n\n- Create a container from the image\n\n```sh\nvedv container create -p 3000:3000/tcp -n todo-101 todo-101-alpine-1.0.0-x86_64\n# 1.766s\n# When the ports are the same like `3000:3000`  the command below is equivalent\n# vedv container create -p 3000/tcp -n todo-101 todo-101-alpine-1.0.0-x86_64\nvedv container start -w todo-101\n# 13.631s\n```\n\n- Open your browser and go to \u003chttp://localhost:3000\u003e\n\n  You should see the todo list manager app\n\n \u003cimg width=300px  src=\"media/todo-list-manager.png\" alt=\"todo list manager\"\u003e\n\n```sh\nvedv container rm --force todo-101\n# 2.829s\n```\n\n#### Updating the Source Code\n\n- In the src/static/js/app.js file, update line 56 to use the new empty text.\n\n```diff\n-  \u003cp className=\"text-center\"\u003eNo items yet! Add one above!\u003c/p\u003e\n+  \u003cp className=\"text-center\"\u003eYou have no todo items yet! Add one above!\u003c/p\u003e\n```\n\n- Let's build our updated version of the image, using the same command we used before.\n\n```sh\nvedv image build -n todo-101-alpine-1.0.0-x86_64\n# 30.420s --\u003e [download] + [import] + [creation] + startup + build + stop time\n```\n\nEach line like the one below is a deleted layer:\n`0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%`\n\nIn this case 4 layers were deleted, starting from `COPY . .` to the end of the file,\nand the layer POWEROFF added during the build process.\n\n- Let's start a new container using the updated code.\n\n```sh\nvedv container create -p 3000/tcp -n todo-101 todo-101-alpine-1.0.0-x86_64\n# 1.811s\nvedv container start -w todo-101\n# 13.698s\n```\n\n- Refresh your browser on \u003chttp://localhost:3000\u003e and you should see your updated help text!\n\n- Remove the container\n\n```sh\nvedv container rm --force todo-101\n# 3.207s\n```\n\n#### Push the image to the registry\n\n👉 There is only 200MB of free space for each user at the moment, so use it\n   for testing purposes only.\n\u003c!--\n💰  I am looking for funding to increase the storage space and provisioning\n    a best server.\n--\u003e\n\n```sh\nvedv image push \u003cyour_user_id\u003e@alpine/todo-101-alpine-1.0.0-x86_64\n# 1m 31.28s 12Mbps\n# If you want to push the image with a different name run the command below:\n# vedv image push -n todo-101-alpine-1.0.0-x86_64 \u003cyour_user_id\u003e@alpine/\u003cyour_image_name\u003e-1.0.0-x86_64\n```\n\n- On finish open your browser and go to \u003chttps://registry.vedv.dev/apps/files/?dir=/00-user-images\u003e\n\nYou should see the collection:\n\n```\n\u003cyour_user_id\u003e@alpine\n```\n\n- Click on the collection and you should see the image file an its .sha256sum file:\n\n```\ntodo-101-alpine-1.0.0-x86_64.ova\ntodo-101-alpine-1.0.0-x86_64.ova.sha256sum\n```\n\n**The uploaded image size is around 130MB, to give chance other users to test vedv,\nplease delete the image from the registry and push an image link instead. Thanks.**\n\n👍 **Congratulations**, you have **builded** and **uploaded** your first image to the registry.\n\n### Share your image\n\nBy default the images are private, only you can see them.\n\nTo make your image public, you need to share it with the group `public`.\n\n- Open your browser and go to \u003chttps://registry.vedv.dev/apps/files/?dir=/00-user-images\u003e\n\n- Click the **Share** button on the image you want to share\n\n\u003cimg width=500px  src=\"media/registry-share-button.png\" alt=\"registry share button\"\u003e\n\n- Or click the **Share folder** menu item\n\n\u003cimg width=500px  src=\"media/registry-share-menu.png\" alt=\"registry share menu\"\u003e\n\n- On the **Sharing** panel search for `public` group and select it\n\n\u003cimg width=500px  src=\"media/registry-share-group.png\" alt=\"registry share group\"\u003e\n\n- If the image is shared the collection must have the **Shared** icon\n\n\u003cimg width=500px  src=\"media/registry-share-done.png\" alt=\"registry share done\"\u003e\n\n👍 **Congratulations**, your image is **Public** and other users can download and use it\n\n### Push an image link to the registry\n\n**If your registry has images that weights MB, to give chance other users to test\nvedv, please delete that images and push image links instead. Thanks.**\n\nDue to the limited storage space at the moment, you should push image links to\nthe registry.\n\n- Export the image to a file with the .ova extension\n\n```sh\nvedv image export todo-101-alpine-1.0.0-x86_64 todo-101-alpine-1.0.0-x86_64.ova\n# 8.157s\n```\n\n- Upload the image and the .sha256sum to OneDrive or Google Drive or any http server,\n\n⚠️  **OneDrive and Google Drive services are always trying to make it difficult to download\nfiles with no recognized clients.**\n\n#### Share on OneDrive\n\n1. Go to \u003chttps://onedrive.live.com\u003e\n\n2. Open the image file menu and Click on **Embed** as shown in the image below\n\n\u003cimg width=500px  src=\"media/onecloud-share-embed-menu.png\" alt=\"onecloud share embed menu\"\u003e\n\n3. Click on **Generate** button\n\n\u003cimg width=400px  src=\"media/onecloud-share-embed-button.png\" alt=\"onecloud share embed button\"\u003e\n\n4. Reaload onedrive page and Click on **Shared**\n\n\u003cimg width=720px  src=\"media/onecloud-shared.png\" alt=\"onecloud shared\"\u003e\n\n5. Click on **Links Tab** and Copy it\n\n\u003cimg width=500px  src=\"media/onecloud-share-embed-copy.png\" alt=\"onecloud share embed copy\"\u003e\n\n- Open your terminal and save the image link to a variable\n\nReplace `\u003cimage_link\u003e` with the link you have copied\n\n```sh\nimage='onedrive=\u003cimage_link\u003e'\n```\n\n- Repeat the steps 1-5 for sharing the .sha256sum file\n\n- On the same terminal save the .sha256sum link to a variable\n\nReplace `\u003csum_link\u003e` with the link you have copied\n\n```sh\nsum='onedrive=\u003csum_link\u003e'\n```\n\n##### Push the image link to the registry\n\n- On the same terminal execute the command below\n\n```sh\nvedv image push-link --image-address \"$image\" --checksum-address \"$sum\" \\\n \u003cyour_user_id\u003e@alpine/todo-101-alpine-1.0.0-x86_64\n # 2.706s\n```\n\n- Remove the image to download it again to test the link\n\n```sh\nvedv image rm todo-101-alpine-1.0.0-x86_64\n# 0.995s\n```\n\n- Pull the image from the link\n\nUse the flag `--no-cache` to download the image again\n\n```sh\nvedv image pull --no-cache -n todo-101-alpine-1.0.0-x86_64 \\\n  \u003cyour_user_id\u003e@alpine/todo-101-alpine-1.0.0-x86_64\n# 17.334s 90Mbps\n```\n\n👍 Congratulations, you have uploaded your image link to the registry and saved space for other users.\n\n#### Share on Google Drive\n\n1. Go to \u003chttps://drive.google.com/\u003e\n\n2. Open the image file menu and Click on **Share** as shown in the image below\n\n\u003cimg width=500px  src=\"media/gdrive-share-menu.png\" alt=\"gdrive share menu\"\u003e\n\n3. Click on **General access** and select **Anyone with the link**\n\n\u003cimg width=400px  src=\"media/gdrive-share-view.png\" alt=\"gdrive share view\"\u003e\n\n5. Copy the link and click on **Done**\n\n\u003cimg width=500px  src=\"media/gdrive-share-view-done.png\" alt=\"gdrive share view done\"\u003e\n\n- Open your terminal and save the image link to a variable\n\nReplace `\u003cimage_link\u003e` with the link you have copied\n\n```sh\nimage='gdrive-big=\u003cimage_link\u003e'\n```\n\n- Repeat the steps 1-5 for sharing the .sha256sum file\n\n- On the same terminal save the .sha256sum link to a variable\n\nReplace `\u003csum_link\u003e` with the link you have copied\n\n```sh\nsum='gdrive-small=\u003csum_link\u003e'\n```\n\n##### Push the image link to the registry\n\n- On the same terminal execute the command below\n\n```sh\nvedv image push-link --image-address \"$image\" --checksum-address \"$sum\" \\\n \u003cyour_user_id\u003e@alpine/todo-101-alpine-1.0.0-x86_64\n```\n\nIf you see the error below:\n`\nerror downloading file from https://drive.google.com/file/d/......\n`\n\nExecute the command below at least 5 times:\n\n```sh\nwget --no-check-certificate \\\n --connect-timeout 10 \\\n --header \"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\" \\\n -O \"alpine-3.18.3-x86_64-fat-inv.ova.sha256sum\" \"https://docs.google.com/uc?export=download\u0026id=1X5v6DYZeEo3zLLd2ZYIEbRO4hI1IQ9gY\"\n```\n\nIf google drive respond with `ERROR 500` or `ERROR 403`,\nand you make a right copy of the url, the error is due google drive it's having problems\nor it can be doing some nasty things to make it hard to download.\n\n- Remove the image to download it again to test the link\n\n```sh\nvedv image rm todo-101-alpine-1.0.0-x86_64\n```\n\n- Pull the image from the link\n\nUse the flag `--no-cache` to download the image again\n\n```sh\nvedv image pull --no-cache -n todo-101-alpine-1.0.0-x86_64 \\\n  \u003cyour_user_id\u003e@alpine/todo-101-alpine-1.0.0-x86_64\n```\n\n- Remove the image\n\n```sh\nvedv image rm --force todo-101-alpine-1.0.0-x86_64\n```\n\n👍 Congratulations, you have uploaded your image link to the registry and saved space for other users.\n\n### Vedvfile instructions\n\n```dockerfile\n\n# --------------\n# Text surrounded by `` on the comments here is for emphasize.\n\n# Environment variables are always expanded in the Vedvfile keeping its quotes,\n# even those surrounded by ''. To avoid a variable expansion on Vedvfile escape\n# it, e.g.: \\$VAR\n# The scope of environment variables is Vedvfile and image os.\n\n# Globbing is disabled in the Vedvfile, it is only enabled on the image os.\n\n# All instructions are evaluated in the Vedvfile, except:\n# RUN, to send the command to the image os as it is.\n# ENV, to send the variable to the image os as it is, with its quotes.\n# (unescaped environment variables are expanded in RUN and ENV instructions too)\n\n# Host os environment variables aren't available in the Vedvfile\n# -------------\n# Download the image from the registry and import it\nFROM admin@alpine/alpine-3.17.3-x86_64\n# Declare an environment variable\n# image os evals `DEST=dest`\nENV DEST=dest\n# Image os evals `GREETINGS='hello world'`\nENV GREETINGS='hello world'\n# Set the shell\nSHELL /bin/sh\n# Copy all files from `src` to `dest`. `COPY src/* dest` doesn't work because\n# globbing is disabled in the Vedvfile.\nCOPY src/ dest\n# Copy as root user\nCOPY --root ./src ./dest\n# Copy and change user and group of `dest` to vedv recursively\nCOPY --chown vedv:vedv src dest\n# Copy `src` to `WORKDIR` as vedv user\nCOPY --user vedv src .\n# Variable `DEST` is expanded in the Vedvfile\nCOPY . $DEST\n# Run command as root user\nRUN --root id\n# Run command as vedv user\nRUN --user vedv id\n# Variable is expanded in the Vedvfile\n# image os evals `echo \"hello world\"`\nRUN echo \"$GREETINGS\"\n# Variable is expanded in the image os, the output is the same as the previous\n# command, image os evals `echo \"$GREETINGS\"`\nRUN echo \"\\$GREETINGS\"\n# Variable is expanded in the Vedvfile\n# image os evals `echo 'hello world'`\nRUN echo '$GREETINGS'\n# Change the system cpu cores and memory\n# Never use this instruction at the end of the Vedvfile, because it poweroff\n# the image and don't save the state, so a rebuild will take more time.\n# It is a very time consuming instruction, to change cpu cores and memory,\n# the image needs to be turned off, the instruction is executed, and the image\n# is turned on again by the next instruction.\nSYSTEM --cpus 2 --memory 512\n```\n\n## Official Images\n\nTransparency and security are very important to us, so all official images\nare created from the scratch, here are the steps:\n\n1. The OS iso is downloaded from the official source and verified\n2. A vm is created from the iso on Virtualbox and started\n3. The vm is configured for vedv. e.g.: For alpine linux 3.17.3-x86_64\n   image configuration:\n    - 3.1. The specific CaC script `icac/images/alpine-linux.vm.prod.cac` is\n         copied and executed in the vm.\n    - 3.2. The common linux CaC script `icac/images/common-linux.vm.prod.cac`\n         is copied and executed in de the vm.\n4. The vm is securely powered off and exported to an `alpine.ova` file\n   from Virtualbox\n5. The `alpine.ova` file is imported with the command:\n  `vedv image import -n alpine-3.17.3-x86_64 ./alpine.ova`\n6. The image is uploaded to the registry with the command:\n  `vedv image push admin@alpine/alpine-3.17.3-x86_64`\n7. The image is tagged as `Official` on registry web interface\n8. The image is shared with the group `public` on registry web interface\n\nWe encourage you to read the CaC scripts to see what they do\ninside the vm.\n\n## Registry\n\nThe registry is a Nextcloud instance, you can host your own registry, Nextcloud\nis free and open source software.\n\nThe scripts for provision and configuration are located at\n`icac/nextcloud/vultr.prod/nextcloud-aio`.\n\nIf you want to host your own registry on Vultr you must have a vultr account\n(I am not associated with vultr), then follow the steps below:\n\n- Copy and edit the .env file, inside the .env look for the section `icac/nextcloud/vultr`\n\n```sh\ncp .env.sample .env\nvim .env\n```\n\n- Provision and Configure the registry\n\n```sh\nmake registry-prod-setup\n```\n\nIf you want to host your own registry on any other cloud provider, you can reuse\nthe CaC script and write your IaC script for provisioning.\n\n## Use Cases\n\n### ydf\n\nydf is a dotfiles manager+ that uses vedv for developing.\n\nydf is the kind of tool that make changes to your system, install apps and write config files,\nso it needs to be tested in a secure, isolated and reproducible environment, to avoid damaging\nyour system and to guarantee that the changes made by ydf are always reproducible on a clean\nsystem during testing. Many apps that are installed by ydf are made for a desktop environments,\nothers apps rely on systemd, and others technologies that doesn't work in docker containers.\n\nydf is developed initially for Manjaro so the vedv image used is `admin@manjaro/manjaro-gnome-22.1.3-x86_64`\n\nYou should open and see the 4 files below available on ydf project to understand how to use vedv\nduring development:\n`Makefile`, `tools/ct-clean-exec`, `Vedvfile`,`.vedvfileignore`\n\nStart with the Makefile at: \u003chttps://github.com/yunielrc/ydf/blob/master/Makefile\u003e\n\nGood luck.\n\n## Contributing\n\nContributions, issues and feature requests are welcome!\n\n### Manjaro dev dependencies\n\n```sh\n# SYSTEM: Linux yuniel-pc 6.1.44-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Aug  9 09:02:26 UTC 2023 x86_64 GNU/Linux\n# YAY\nmake 4.4.1-2\ndavfs2 1.7.0-1\npython-pre-commit 2.20.0-3\nshfmt 3.7.0-1\nshellcheck 0.9.0-45\nnodejs 20.5.0-1\nnpm 9.8.1-1\nbash-bats 1.9.0-1\nbash-bats-assert-git 2.1.0-1\nbash-bats-file 0.4.0-2\nbash-bats-support-git 0.3.0-1\nvultr-cli 2.17.0-1\n# NPM\n@commitlint/cli@17.7.1\n@commitlint/config-conventional@17.7.0\ncommitizen@4.3.0\ncz-conventional-changelog@3.3.0\n\n```\n\n### Ubuntu dev dependencies\n\n```sh\n# SYSTEM: Linux user-MS-7D43 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux\n# APT\ndavfs2 1.6.1-1\nmake 4.3-4.1build1\npre-commit 2.17.0-1\n# SNAP\nnode 18.17.1\nshellcheck v0.9.0\nshfmt 3.5.1\n# NPM\n@commitlint/cli@17.7.1\n@commitlint/config-conventional@17.7.0\nbats@1.10.0\ncommitizen@4.3.0\ncz-conventional-changelog@3.3.0\n# GITHUB\nbats-support\nbats-assert\nbats-file\nvultr-cli\n\n```\n\n### Configure dev environment\n\n#### Copy config samples\n\nExecute the command below to copy config samples to the product root directory\n\n```sh\ncp .env.sample .env\ncp .vedv.env.sample .vedv.env\n```\n\n#### Install dependencies\n\nFor Manjaro:\n\n```sh\nmake OS=manjaro configure\n```\n\nFor Ubuntu:\n\n```sh\nmake OS=ubuntu configure\n```\n\n#### Setup registry development service\n\nExecute the command below to provision and configure the registry development service\non local machine\n\n```sh\nmake registry-dev-setup\n```\n\n### Workflow\n\n#### Code\n\nWrite your code\n\n#### Run Tests\n\n⚠️ **Before testing, Virtualbox can't have any virtual machines or hard disks otherwise,\nfunctional and integration tests that work with virtualbox will fail.**\n\n⚠️ **Some functional and integration tests use OneDrive and Google Drive services, if any\nof these services fail, the test will fail too.**\n\nIf functional and integration tests that work with virtualbox are failing,\ndelete all virtual machines and hard disks from Virtualbox and delete the\nVirtualbox VMs directory usually located at `~/VirtualBox\\ VMs` and run the tests again.\n\nBefore testing, the **registry development service must be started**.\nCheck the status with the command below.\n\n```sh\nmake registry-dev-status\n```\n\nStart it if stopped\n\n```sh\nmake registry-dev-start\n```\n\nRun Unit Testing for one component\n\n```sh\nmake test-suite u=\"$(fd registry-service.bats)\"\n# 4.899s\n```\n\nRun Unit Testing for one function\n\n```sh\nmake test-name n='::push_link\\(\\)' u=\"$(fd registry-service.bats)\"\n# 0.676s\n```\n\nRun Integration Testing for one function\n\n```sh\nmake test-name n='download_file()' u=\"$(fd registry-nextcloud-api-client.i.bats)\"\n# 3.105s\n```\n\nRun Functional Testing for one function\n\n```sh\nmake test-name n=\"vedv registry push[^-]\" u=\"$(fd registry-command.f.bats)\"\n# 13.85s\n```\n\nRun All Unit Tests\n\n```sh\nmake test-unit\n# 1m 4.09s\n```\n\nRun All Integration Tests\n\n```sh\nmake test-integration\n```\n\nRun All Functional Tests\n\n```sh\nmake test-functional\n```\n\nRun All tests\n\nOn Manjaro\n\n```sh\nmake OS=manjaro test-all\n# 45m 12.79s\n```\n\nOn Ubuntu\n\n```sh\nmake OS=ubuntu test-all\n```\n\n#### Commit\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).\n\nFor commiting use the command below\n\n```sh\nmake commit\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunielrc%2Fvedv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunielrc%2Fvedv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunielrc%2Fvedv/lists"}