-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloud_config_node.yaml
127 lines (117 loc) · 4.08 KB
/
cloud_config_node.yaml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#cloud-config
###########################################################################################################
# EXOSCALE USERDATA TEMPLATE PawCloud-XMR
#==========================================================================================================
#
# Insert this into UserData when you make a new instance. You should make a template out
# of this instance, as its your preconfigured 'prime node', using the exo command line.
# Then make an instance pool out of the template image. Your nodes should all hook up
# to your proxy nicely.
#
# Virtual machine settings:
#
# Hostname: pawcloud-node
# OS: Ubuntu 20.04 LTS
# Instance Type: CPU Large 16 vCPU | GB 2 x 2198 MHz
# Disk: 10 GB
#
# These settings will need to be adjusted after the VM warms up:
#
# Private Network: pawcloud (if you don't have one, make one)
# Private Network Type: Managed
# Private Network IP: 10.0.0.2
#
# Please note that warm up time on the prime node can take any where from 30 to 45 minutes
# depending on exoscale's availability for shared cpus at the time you spawn an instance.
# This, in the end is worth the trade off for better hashrate, as xmrig is being built against
# the VMs kernel for the fastest speed/compatibility possible (400h/s -> 2.1kh/s just by
# compiling on a 16 vCPU node for proper AES flags)
#
# <heavyr> *notices your nikoli tesla bulge* uwu
#
###########################################################################################################
# Networking configuration - This makes the settings in the dash have no effect on cloud-init inside the vm
# which is really what we want to do (i.e.: stop ourselfs from f**king things up!)
preserve_hostname: false
hostname: pawcloud-proxy
manage_resolv_conf: true
resolv_conf:
nameservers: ['8.8.4.4', '8.8.8.8']
searchdomains:
- ns1.pawcloud.com
- ns2.pawcloud.com
domain: pawcloud.com
options:
rotate: true
timeout: 1
# Group and user configuration - I haven't had success modifying the default ubuntu user, it
# seems to make exoscale's dash go BORK along with the ssh.
# So we are just appending our app user.
groups:
- ubuntu [root,sys]
- cloud-users
users:
- default
- name: xmrnode
gecos: PawCloud XMR Node User
home: /home/xmrnode
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
primary_group: xmrnode
groups: cloud-users
plain_text_passwd: 'pawcloud-xmrnode1'
ssh_import_id: None
lock_passwd: false
# Filesystem configuration
growpart:
mode: auto
devices: ["/"]
ignore_growroot_disabled: false
# Files to write.
write_files:
- path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
content: |
network: {config: disabled}
- path: /etc/netplan/20-eth0_custom.yaml
content: |
network:
version: 2
ethernets:
eth0:
match:
name: eth0
set-name: eth0
dhcp4: true
nameservers:
search: [ns1.local, ns2.local]
addresses: [8.8.8.8, 8.8.4.4]
- path: /etc/netplan/21-eth1_custom.yaml
content: |
network:
version: 2
ethernets:
eth1:
match:
name: eth1
set-name: eth1
dhcp4: true
- path: /home/xmrnode/00-install_xmrnode.sh
content: |
#!/bin/bash
{
. ~/.bashrc
curl -L https://raw.githubusercontent.com/loopyd/pawcloud-xmr/main/xmrig-install.sh | bash
} > /home/xmrnode/install-log.txt
full_path=$(realpath $0)
rm -f "$full_path"
# Package manager
apt_update: true
apt_upgrade: true
apt_reboot_if_required: yes
# Commands to run
runcmd:
- [ netplan, apply ]
- [ sh, -xc, "cp /etc/skel/.* /home/xmrnode" ]
- [ sh, -xc, "chown -R xmrnode:xmrnode /home/xmrnode" ]
- [ sh, -xc, "chmod +x /home/xmrnode/00-install_xmrnode.sh" ]
- [ su, -c, /home/xmrnode/00-install_xmrnode.sh, -s, /bin/bash, xmrnode ]