-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsearch_machine.bash
More file actions
executable file
·53 lines (42 loc) · 1.27 KB
/
search_machine.bash
File metadata and controls
executable file
·53 lines (42 loc) · 1.27 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
#!/bin/bash
#
# This script generates a "Search Machine" using Multipass. Initial
# focus is on PageFind and Solr.
#
# I am using this machine to explore search and citeproc (JS implementation).
#
# Multipass is launching a Ubuntu 24.04 LTS machine.
#
echo "Launch search-machine"
multipass launch jammy \
-vv \
--cpus 2 \
--memory 4G \
--name search-machine \
--cloud-init search-machine.yaml
echo "Restarting VM"
if ! multipass restart search-machine; then
echo
echo 'failed multipass restart, aborting'
echo
exit 1
fi
VM_IP_ADDRESS=$(multipass list | grep search-machine | cut -c 43-58)
cat <<EOT
Welcome to the Search Machine. You can access if with
multipass shell search-machine
Additional scripts are available for setup and experimentation.
The scripts are installed into /usr/local/bin.
To get the list of scripts run
menu_of_scripts.bash
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.
This is handy so you can setup port forward for local
services like.
ssh -L 8011:localhost:8011 ubuntu@${VM_IP_ADDRESS}
EOT