Сборка образа VyOS. Репозиторий
Репозиторий с поддержкой сборки образов VyOS.
Содержание
1 Общая информация
- Репозиторий предназначен для хранения образов VyOS, собранных для обучения.
- Образы собираются по стандартной методике (см. GNS3. Образ VyOS).
- Сборка организуется по технологии непрерывной интеграции (см. Непрерывная интеграция. GitHub Actions).
2 Репозиторий
- Репозиторий: https://github.com/yamadharma/vyos-build
3 Скрипт для сборки
- Помещается в каталог
.github/workflows
репозиторий. - Назовём его
vyos-build-release.yml
1name: VyOS Build (Release) 2 3on: 4 push: 5 tags: 6 - "*" 7 8jobs: 9 build: 10 11 runs-on: ubuntu-latest 12 container: 13 # For VyOS 1.2 (crux) use vyos/vyos-build:crux 14 # For VyOS 1.3 (equuleus) use vyos/vyos-build:equuleus 15 # For our VyOS rolling release you should use vyos/vyos-build which will always refer to the latest image. 16 # Ref: https://docs.vyos.io/en/latest/contributing/build-vyos.html#build 17 image: vyos/vyos-build:equuleus 18 env: 19 TZ: Etc/UTC 20 options: --privileged 21 22 23 steps: 24 - name: Set env 25 run: | 26 echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV 27 28 - name: git clone vyos-build 29 run: | 30 set -eux 31 32 git clone -b equuleus --single-branch https://github.com/vyos/vyos-build 33 34 - name: configure 35 working-directory: vyos-build 36 run: | 37 set -eux 38 39 ./configure \ 40 --architecture amd64 \ 41 --build-by yamadharma@gmail.com \ 42 --build-type release \ 43 --version ${{ env.RELEASE_VERSION }} 44 45 - name: make iso 46 working-directory: vyos-build 47 run: | 48 set -eux 49 50 make iso 51 52 - name: make qemu 53 working-directory: vyos-build 54 run: | 55 set -eux 56 57 make qemu 58 59 - name: ls 60 run: | 61 set -eux 62 63 pwd 64 ls -lah 65 ls -lah vyos-build/build 66 67 - uses: actions/create-release@master 68 id: create_release 69 env: 70 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 71 with: 72 tag_name: ${{ github.ref }} 73 release_name: VyOS ${{ github.ref }} for Education 74 body: | 75 VyOS ${{ env.RELEASE_VERSION }} for Education 76 draft: true 77 prerelease: true 78 79 - uses: actions/upload-release-asset@master 80 env: 81 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 82 with: 83 # 84 upload_url: ${{ steps.create_release.outputs.upload_url }} 85 # 86 asset_path: vyos-build/build/vyos-${{ env.RELEASE_VERSION }}-amd64.iso 87 # 88 asset_name: vyos-${{ env.RELEASE_VERSION }}-amd64.iso 89 # 90 asset_content_type: application/x-iso9660-image 91 92 - uses: actions/upload-release-asset@master 93 env: 94 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 95 with: 96 # 97 upload_url: ${{ steps.create_release.outputs.upload_url }} 98 # 99 asset_path: vyos-build/build/vyos-${{ env.RELEASE_VERSION }}-amd64.qcow2 100 # 101 asset_name: vyos-${{ env.RELEASE_VERSION }}-amd64.qcow2 102 # 103 asset_content_type: application/x-qemu-disk
- Строка 6: запускаем скрипт при создании любого тега.
- Строка 26: из полной ссылки на ветку тега выделяем номер версии.
refs/tags/v1.3.x
->1.3.x
.
4 Описание приложения для GNS3
- Для установки образа VyOS в GNS3 (см. Средство натурного моделирования сетей GNS3) необходимо создать файл приложения:
1{ 2 "appliance_id": "a5250e6e-be54-40d3-9082-0f0b601d3231", 3 "name": "VyOS", 4 "category": "router", 5 "description": "VyOS is a community fork of Vyatta, a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. Non-official build for Eduacation", 6 "vendor_name": "Linux", 7 "vendor_url": "https://vyos.net/", 8 "documentation_url": "https://docs.vyos.io/", 9 "product_name": "VyOS", 10 "product_url": "https://vyos.net/", 11 "registry_version": 4, 12 "status": "stable", 13 "maintainer": "Dmitry S. Kulyabov", 14 "maintainer_email": "yamadharma@gmail.com", 15 "usage": "Default username/password is vyos/vyos.\n\nThe -KVM versions are ready to use, no installation is required.\nThe other images will start the router from the CDROM on initial boot. Login and then type \"install image\" and follow the instructions.", 16 "symbol": "vyos.svg", 17 "port_name_format": "eth{0}", 18 "qemu": { 19 "adapter_type": "e1000", 20 "adapters": 3, 21 "ram": 512, 22 "hda_disk_interface": "scsi", 23 "arch": "x86_64", 24 "console_type": "telnet", 25 "boot_priority": "cd", 26 "kvm": "allow" 27 }, 28 "images": [ 29 { 30 "filename": "vyos-1.3.3-amd64.iso", 31 "version": "1.3.3-iso", 32 "md5sum": "1ab25e1b63d9e3305bd5264721305794", 33 "filesize": 382730240, 34 "download_url": "https://github.com/yamadharma/vyos-build/releases/tag/v1.3.3", 35 "direct_download_url": "https://github.com/yamadharma/vyos-build/releases/download/v1.3.3/vyos-1.3.3-amd64.iso" 36 }, 37 { 38 "filename": "vyos-1.3.3-amd64.qcow2", 39 "version": "1.3.3-qemu", 40 "md5sum": "9dffb9ab2af456c1eb993c0beef81b91", 41 "filesize": 410058752, 42 "download_url": "https://github.com/yamadharma/vyos-build/releases/tag/v1.3.3", 43 "direct_download_url": "https://github.com/yamadharma/vyos-build/releases/download/v1.3.3/vyos-1.3.3-amd64.qcow2" 44 }, 45 { 46 "filename": "empty8G.qcow2", 47 "version": "1.0", 48 "md5sum": "f1d2c25b6990f99bd05b433ab603bdb4", 49 "filesize": 197120, 50 "download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/", 51 "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty8G.qcow2/download" 52 } 53 ], 54 "versions": [ 55 { 56 "name": "1.3.3-iso", 57 "images": { 58 "hda_disk_image": "empty8G.qcow2", 59 "cdrom_image": "vyos-1.3.3-amd64.iso" 60 } 61 }, 62 { 63 "name": "1.3.3-qemu", 64 "images": { 65 "hda_disk_image": "vyos-1.3.3-amd64.qcow2" 66 } 67 } 68 ] 69}
5 Использование в GNS3
5.1 Установка образа VyOS quemu в GNS3
- Скачайте файл
vyos-edu.gns3a
из репозитория: https://github.com/yamadharma/vyos-build/releases. - Импортируйте
vyos-edu.gns3a
в GNS3 через пункт меню File>Import appliance. - Установите необходимую версию VyOS.