Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
windows_vms/dist
*.swp
5 changes: 4 additions & 1 deletion linux_vms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ echo "${{VARIABLE}}"
## Example
The example script [ubuntu.sh](./ubuntu.sh) installs KasmVNC on the Ubuntu VM and configures a KasmVNC user using the configured username and password in the [auto-scale configuration's](https://docs.kasm.com/docs/guide/compute/pools.html#autoscale-configurations) Connection User and Connection Password fields. Kasm Workspaces can also work with a traditional VNC server. The example ubuntu.sh script also includes a function for installing, configuring, and starting tigervnc on the default port 5901.

Additional KasmVNC installers for other distros can be found on the public [KasmVNC github repository](https://github.com/kasmtech/KasmVNC/releases)
Additional KasmVNC installers for other distros can be found on the public [KasmVNC github repository](https://github.com/kasmtech/KasmVNC/releases)

### cloud-config.yaml
This is a default cloud init configuation that can be used as a startup script for Ubuntu servers running on Harvester/KubeVirt platforms.
47 changes: 47 additions & 0 deletions linux_vms/cloud-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#cloud-config
package_update: true
packages:
- qemu-guest-agent
- sudo
users:
- name: kasm-admin
shell: /bin/bash
lock_passwd: true
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- {ssh_key}

write_files:
- path: /usr/local/bin/server-check-in.sh
permissions: '0755'
content: |
#!/bin/bash
curl -k -X POST -H "Content-Type: application/json" -d '{{"status": "running", "status_message": "Initialization Complete", "status_progress": "100"}}' https://{upstream_auth_address}/api/set_server_status?token={checkin_jwt}
- path: /etc/systemd/system/server-checkin.service
content: |
[Unit]
Description=Kasm Server Check-in

[Service]
Type=oneshot
ExecStart=/usr/local/bin/server-check-in.sh
- path: /etc/systemd/system/server-checkin.timer
content: |
[Unit]
Description=Run Kasm Server Check-in every 30 seconds

[Timer]
OnBootSec=20
OnUnitActiveSec=30s

[Install]
WantedBy=timers.target
runcmd:
- - systemctl
- enable
- --now
- qemu-guest-agent.service
- sleep 15
- systemctl daemon-reload
- systemctl enable server-checkin.timer
- systemctl start server-checkin.timer