|
| 1 | +name = "osbuild-getting-started-fedora-39" |
| 2 | +distro = "fedora-39" |
| 3 | +version = "0.0.5" |
| 4 | + |
| 5 | +# CUDACXX=/usr/local/cuda-12/bin/nvcc CMAKE_ARGS="-DLLAMA_CUBLAS=on -DCMAKE_CUDA_ARCHITECTURES=native" pip install --force-reinstall --no-cache-dir llama-cpp-python |
| 6 | + |
| 7 | +packages = [ |
| 8 | + { name = "bash-completion" }, |
| 9 | + { name = "btrfs-progs-devel" }, |
| 10 | + { name = "cmake" }, |
| 11 | + { name = "cryptsetup" }, |
| 12 | + { name = "delve" }, |
| 13 | + { name = "device-mapper-devel" }, |
| 14 | + { name = "device-mapper-devel" }, |
| 15 | + { name = "device-mapper-libs" }, |
| 16 | + { name = "g++" }, |
| 17 | + { name = "gdisk" }, |
| 18 | + { name = "git" }, |
| 19 | + { name = "golang" }, |
| 20 | + { name = "gpgme" }, |
| 21 | + { name = "gpgme-devel" }, |
| 22 | + { name = "libassuan" }, |
| 23 | + { name = "libassuan-devel" }, |
| 24 | + { name = "openssh-server" }, |
| 25 | + { name = "ostree" }, |
| 26 | + { name = "podman" }, |
| 27 | + { name = "policycoreutils-python-utils" }, |
| 28 | + { name = "procps-ng" }, |
| 29 | + { name = "python3-devel" }, |
| 30 | + { name = "python3-dnf" }, |
| 31 | + { name = "python3-docutils" }, |
| 32 | + { name = "python3-pip" }, |
| 33 | + { name = "python3-rich" }, |
| 34 | + { name = "python3-tomli" }, |
| 35 | + { name = "python3-typer" }, |
| 36 | + { name = "python3.11" }, |
| 37 | + { name = "qemu-img" }, |
| 38 | + { name = "rpm-build" }, |
| 39 | + { name = "rpm-ostree" }, |
| 40 | + { name = "rsync" }, |
| 41 | + { name = "selinux-policy-devel" }, |
| 42 | + { name = "skopeo" }, |
| 43 | + { name = "tmux" }, |
| 44 | + { name = "vim" }, |
| 45 | + ] |
| 46 | + |
| 47 | +[customizations] |
| 48 | +hostname = "osbuild-getting-started-vm" |
| 49 | + |
| 50 | +[[customizations.filesystem]] |
| 51 | +mountpoint = "/" |
| 52 | +# 10GB |
| 53 | +minsize = 10737418240 |
| 54 | +# 20GB |
| 55 | +#minsize = 21474836480 |
| 56 | +# 25GB |
| 57 | +#minsize = 26843545600 |
| 58 | +# 50GB |
| 59 | +#minsize = 53687091200 |
| 60 | + |
| 61 | +[customizations.locale] |
| 62 | +languages = ["en_US.UTF-8"] |
| 63 | +keyboard = "de" |
| 64 | + |
| 65 | +[customizations.timezone] |
| 66 | +timezone = "Europe/Vienna" |
| 67 | + |
| 68 | +[customizations.services] |
| 69 | +enabled = ["firstboot-tasks"] |
| 70 | + |
| 71 | +[[customizations.files]] |
| 72 | +path = "/etc/systemd/system/firstboot-tasks.service" |
| 73 | +data = """[Unit] |
| 74 | +Description=Do all kinds of firstboot tasks |
| 75 | +ConditionPathExists=/etc/firstboot-tasks.touch |
| 76 | +Wants=network-online.target |
| 77 | +After=network-online.target |
| 78 | + |
| 79 | +[Service] |
| 80 | +Type=oneshot |
| 81 | +User=root |
| 82 | + |
| 83 | +ExecStart=/bin/bash -c 'echo "host_data /workspaces virtiofs defaults,user 0 0" | tee -a /etc/fstab' |
| 84 | +ExecStart=/bin/bash -c 'echo "host_go_cache /home/osbuild/go virtiofs defaults,user 0 0" | tee -a /etc/fstab' |
| 85 | +ExecStart=/usr/bin/systemctl daemon-reload |
| 86 | +ExecStart=/usr/bin/mount /workspaces |
| 87 | +ExecStart=/usr/bin/mount /home/osbuild/go |
| 88 | + |
| 89 | +ExecStart=/bin/bash -c 'echo "cd /workspaces" >> /home/osbuild/.bashrc' |
| 90 | + |
| 91 | +ExecStart=/usr/bin/rm /etc/firstboot-tasks.touch |
| 92 | + |
| 93 | +[Install] |
| 94 | +WantedBy=multi-user.target |
| 95 | +""" |
| 96 | + |
| 97 | +# Indicate that we never did firstboot tasks |
| 98 | +[[customizations.files]] |
| 99 | +path = "/etc/firstboot-tasks.touch" |
| 100 | +data = """ Trigger to firstboot tasks - file is removed after first run |
| 101 | +""" |
| 102 | + |
| 103 | +[[customizations.directories]] |
| 104 | +path = "/home/osbuild/go" |
| 105 | +mode = "0755" |
| 106 | +user = "osbuild" |
| 107 | +group = "osbuild" |
| 108 | + |
| 109 | +[[customizations.directories]] |
| 110 | +path = "/workspaces" |
| 111 | +mode = "0755" |
| 112 | +user = "osbuild" |
| 113 | +group = "osbuild" |
| 114 | + |
| 115 | +[[customizations.files]] |
| 116 | +path = "/workspaces/init.sh" |
| 117 | +data = """#!/usr/bin/bash |
| 118 | +# This should be hidden by mounting your local host directory |
| 119 | +# but it's also possible to get all the sources in the VM |
| 120 | +git clone [email protected]:osbuild/community-gateway.git |
| 121 | +git clone [email protected]:osbuild/image-builder-frontend.git |
| 122 | +git clone [email protected]:osbuild/image-builder.git |
| 123 | +git clone [email protected]:osbuild/images.git |
| 124 | +git clone [email protected]:osbuild/osbuild-composer.git |
| 125 | +git clone [email protected]:osbuild/osbuild-getting-started.git |
| 126 | +git clone [email protected]:osbuild/osbuild.git |
| 127 | +git clone [email protected]:osbuild/pulp-client.git |
| 128 | +""" |
| 129 | + |
| 130 | +# no password needed for sudo |
| 131 | +[[customizations.files]] |
| 132 | +path = "/etc/sudoers.d/%wheel" |
| 133 | +data = """%wheel ALL=(ALL) NOPASSWD: ALL |
| 134 | +""" |
| 135 | + |
| 136 | +[[customizations.sshkey]] |
| 137 | +user = "root" |
| 138 | +key = "REPLACEME_KEY_ROOT" |
| 139 | + |
| 140 | +[[customizations.group]] |
| 141 | +name = "osbuild" |
| 142 | +gid = 1000 |
| 143 | + |
| 144 | +[[customizations.user]] |
| 145 | +name = "osbuild" |
| 146 | +description = "Administrator account and runner for the containers" |
| 147 | +password = "REPLACEME_PASSWORD_USER" |
| 148 | +key = "REPLACEME_KEY_USER" |
| 149 | +home = "/home/osbuild" |
| 150 | +shell = "/bin/bash" |
| 151 | +groups = [ "users", "wheel"] |
| 152 | +uid = 1000 |
| 153 | +gid = 1000 |
| 154 | + |
| 155 | + |
0 commit comments