-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure-remote.sh
More file actions
executable file
·36 lines (26 loc) · 947 Bytes
/
Copy pathconfigure-remote.sh
File metadata and controls
executable file
·36 lines (26 loc) · 947 Bytes
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
#!/bin/bash
#relies on configuration form setup-run-crc.sh
check-status () { crc status | grep -E "OpenShift:\s+Running" > /dev/null 2>&1; }
#until [ `crc status | grep -E "OpenShift:\s+Running"` ];
until check-status;
do
echo "Waiting for crc to come up......"
sleep 10s
done
echo "crc running; proceeding..."
# get some data about the machine
#don't need this anymore but the command might be useful
SERVER_IP=`hostname -I | awk ' { print $2 }'`
CRC_IP=`$HOME/bin/crc ip`
sudo ./configure-remote-priv.sh $SERVER_IP $CRC_IP
#create the host dns files
cat << EOF > $HOME/00-use-dnsmasq.conf
[main]
dns=dnsmasq
EOF
cat << EOF > $HOME/01-crc.conf
address=/apps-crc.testing/$SERVER_IP
address=/api.crc.testing/$SERVER_IP
EOF
echo "On your host machine, you need to copy $HOME/00-use-dnsmasq.conf to /etc/NetworkManager/conf.d/ and "
echo "$HOME/01-crc to /etc/NetworkManager/dnsmasq.d/ and then 'sudo systemctl reload NetworkManager'."