-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloud-init.template.yml
More file actions
94 lines (78 loc) · 2.32 KB
/
Copy pathcloud-init.template.yml
File metadata and controls
94 lines (78 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#cloud-config
# GraphDone Multipass VM Cloud-Init Configuration
# This file is automatically generated - do not edit directly
# Edit vm.config.yml instead
users:
- default
- name: graphdone
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
groups: docker
ssh_authorized_keys: []
package_update: true
package_upgrade: true
packages:
- build-essential
- curl
- wget
- git
- htop
- vim
- net-tools
- apt-transport-https
- ca-certificates
- software-properties-common
- gnupg
- lsb-release
{{DEV_TOOLS_PACKAGES}}
runcmd:
# Update system
- echo "=== GraphDone VM Setup Starting ==="
- export DEBIAN_FRONTEND=noninteractive
# Install Docker if enabled
{{DOCKER_INSTALL}}
# Install Node.js
{{NODEJS_INSTALL}}
# Install Tailscale if enabled
{{TAILSCALE_INSTALL}}
# Clone GraphDone repository
- echo "=== Cloning GraphDone repository ==="
- su - ubuntu -c "git clone -b {{GRAPHDONE_BRANCH}} {{GRAPHDONE_REPO}} {{GRAPHDONE_PATH}}"
- chown -R ubuntu:ubuntu {{GRAPHDONE_PATH}}
# Setup GraphDone
{{GRAPHDONE_SETUP}}
# Configure services to run on boot if enabled
{{STARTUP_CONFIG}}
# Final setup
- echo "=== GraphDone VM Setup Complete ==="
- echo "GraphDone is installed at {{GRAPHDONE_PATH}}"
- echo "To access: multipass shell {{VM_NAME}}"
- echo "Web UI will be available at: http://localhost:3127"
- echo "GraphQL API: http://localhost:4127/graphql"
- echo "Neo4j Browser: http://localhost:7474"
write_files:
- path: /etc/profile.d/graphdone.sh
content: |
export GRAPHDONE_HOME={{GRAPHDONE_PATH}}
export PATH="$GRAPHDONE_HOME/tools:$PATH"
permissions: '0644'
- path: /home/ubuntu/.bashrc
append: true
content: |
# GraphDone Environment
export GRAPHDONE_HOME={{GRAPHDONE_PATH}}
export PATH="$GRAPHDONE_HOME/tools:$PATH"
alias gd="cd $GRAPHDONE_HOME"
alias gd-start="cd $GRAPHDONE_HOME && ./start"
alias gd-stop="cd $GRAPHDONE_HOME && ./start stop"
alias gd-status="cd $GRAPHDONE_HOME && ./start status"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
{{SYSTEMD_SERVICE}}
power_state:
mode: reboot
delay: now
message: Rebooting after GraphDone setup
condition: true