-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnewt_machine.bash
More file actions
executable file
·49 lines (39 loc) · 1.16 KB
/
newt_machine.bash
File metadata and controls
executable file
·49 lines (39 loc) · 1.16 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
#!/bin/bash
#
# This script generates a "Newt Machine" using Multipass.
#
echo "Launch newt-machine"
multipass launch \
--name newt-machine \
--memory 4G \
--disk 150G \
--cpus 2 \
--cloud-init newt-machine.yaml
multipass info newt-machine
NEWT_IP_ADDRESS=$(multipass list | grep newt-machine | cut -c 43-58)
cat <<EOT
Weclome to the Newt Machine. You can
access if with
multipass shell newt-machine
You can then run one or more additional
configuration scripts to add additional
software for development.
01-setup-scripts.bash
02-add-python-packages.bash
03-add-go-and-caltechlibrary-tools.bash
04-ghcup-install.bash
05-pandoc-build.bash
06-postgrest-build.bash
07-add-opensearch.bash
08-add-solr.bash
The first and second ones are needed for
Newt Projects. The rest are optional
You can grant yourself SSH access with the following
command when you connect using multipass shell.
ssh-keygen
curl -L -o - https://github.com/${USER}.keys \
>>.ssh/authorized_keys
This is handy so you can setup port forward for local
services like.
ssh -L 8011:localhost:8011 ubuntu@${NEW_IP_ADDRESS}
EOT