Continue writing exercise 2.
This commit is contained in:
@ -54,6 +54,12 @@ We will want to login to our soon to be created **Low side** aws ec2 instance re
|
||||
aws ec2 authorize-security-group-ingress --group-id $SG_ID --protocol tcp --port 22 --cidr 0.0.0.0/0
|
||||
```
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *Opening ssh port ingress* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 2.3 - Create prep system instance
|
||||
|
||||
@ -75,7 +81,76 @@ aws ec2 run-instances --image-id "ami-092b43193629811af" \
|
||||
```
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *Workshop login page* |
|
||||
| *Launching a prep rhel8 ec2 instance* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 2.4 - Downloading tools
|
||||
|
||||
Now that our prep system is up, let's `ssh` into it and download the content we'll need to support our install on the high side.
|
||||
|
||||
Copy the commands below into your web terminal. Let's start by retrieving the IP for the new ec2 instance and then connecting via `ssh`:
|
||||
|
||||
> Note: If your `ssh` command times out here, your prep system is likely still booting up. Give it a minute and try again.
|
||||
|
||||
```bash
|
||||
PREP_SYSTEM_IP=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=disco-prep-system" | jq -r '.Reservations[0].Instances[0].PublicIpAddress')
|
||||
echo $PREP_SYSTEM_IP
|
||||
|
||||
ssh -i ~/disco_key ec2-user@$PREP_SYSTEM_IP
|
||||
```
|
||||
|
||||
|
||||
For the purposes of this workshop, rather than downloading mirror content to a USB drive as we would likely do in a real SneakerOps situation, we will instead be saving content to an EBS volume which will be mounted to our prep system on the **Low side** and then subsequently to our bastion system on the **High side**.
|
||||
|
||||
Once your prep system has booted let's mount the EBS volume we attached so we can start downloading content. Copy the commands below into your web terminal:
|
||||
|
||||
```bash
|
||||
sudo mkfs -t xfs /dev/nvme1n1
|
||||
sudo mkdir /mnt/high-side
|
||||
sudo mount /dev/nvme1n1 /mnt/high-side
|
||||
sudo chown ec2-user:ec2-user /mnt/high-side
|
||||
cd /mnt/high-side
|
||||
```
|
||||
|
||||
With our mount in place let's grab the tools we'll need for the bastion server - we'll use some of them on the prep system too. Life's good on the low side; we can download these from the internet and tuck them into our high side gift basket at `/mnt/high-side`.
|
||||
|
||||
There are four tools we need, copy the commands for each into your web terminal to download each one:
|
||||
|
||||
1. `oc` OpenShift cli
|
||||
|
||||
```bash
|
||||
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz -L -o oc.tar.gz
|
||||
tar -xzf oc.tar.gz oc && rm -f oc.tar.gz
|
||||
sudo cp oc /usr/local/bin/
|
||||
```
|
||||
|
||||
2. `oc-mirror` oc plugin for mirorring release, operator, and helm content
|
||||
|
||||
```bash
|
||||
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/oc-mirror.tar.gz -L -o oc-mirror.tar.gz
|
||||
tar -xzf oc-mirror.tar.gz && rm -f oc-mirror.tar.gz
|
||||
chmod +x oc-mirror
|
||||
sudo cp oc-mirror /usr/local/bin/
|
||||
```
|
||||
|
||||
3. `mirror-registry` small-scale Quay registry designed for mirroring
|
||||
|
||||
```bash
|
||||
curl https://mirror.openshift.com/pub/openshift-v4/clients/mirror-registry/latest/mirror-registry.tar.gz -L -o mirror-registry.tar.gz
|
||||
tar -xzf mirror-registry.tar.gz
|
||||
rm -f mirror-registry.tar.gz
|
||||
```
|
||||
|
||||
4. `openshift-installer` The OpenShift installer cli
|
||||
|
||||
```bash
|
||||
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-install-linux.tar.gz -L -o openshift-installer.tar.gz
|
||||
tar -xzf openshift-installer.tar.gz openshift-install
|
||||
rm -f openshift-installer.tar.gz
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
public/static/images/disconnected/launch-prep-ec2.gif
Normal file
BIN
public/static/images/disconnected/launch-prep-ec2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 314 KiB |
BIN
public/static/images/disconnected/ssh-port-ingress.gif
Normal file
BIN
public/static/images/disconnected/ssh-port-ingress.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
Reference in New Issue
Block a user