forked from suse-edge/metal3-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since all this runs is the image cache now it can be removed, instead we'll use the podman container cache running on the hypervisor
- Loading branch information
1 parent
b8c6ab8
commit 4e0fb66
Showing
29 changed files
with
74 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
PROJECT_DIR=$(dirname -- $(readlink -e -- ${BASH_SOURCE[0]})) | ||
EXTRA_VARS_FILE=${EXTRA_VARS_FILE:-$PROJECT_DIR/extra_vars.yml} | ||
|
||
if [[ "$(id -u)" -eq 0 ]]; then | ||
echo "Please run as a non-root user" | ||
exit 1 | ||
fi | ||
|
||
# Run ansible configure host playbook | ||
export ANSIBLE_ROLES_PATH=$PROJECT_DIR/roles | ||
ANSIBLE_FORCE_COLOR=true ansible-playbook \ | ||
-i ${PROJECT_DIR}/inventories/localhost_inventory.yml \ | ||
-e "@${EXTRA_VARS_FILE}" \ | ||
$PROJECT_DIR/playbooks/setup_metal3_core.yml $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,26 +46,24 @@ If desired the defaults from `extra_vars.yml` can be customized, copy the file a | |
``` | ||
- If you plan not to use the virsh networks, you will need to set up your own network bridges. | ||
|
||
3. Create the Network Infra VM | ||
3. Configure the host | ||
|
||
- In the main directory of the repository, execute the script to create the network-infra VM | ||
- In the main directory of the repository, execute the script to configure the host: | ||
|
||
```shell | ||
./setup_metal3_network_infra.sh | ||
./02_configure_host.sh | ||
``` | ||
|
||
- You may pass `-vvv` at the end of the script to see the output of the script | ||
- The network-infra script must have completed without any errors before creating the core VM in step 8 | ||
|
||
4. Create the core VM | ||
4. Create management cluster | ||
|
||
```shell | ||
./setup_metal3_core.sh | ||
./03_launch_mgmt_cluster.sh | ||
``` | ||
|
||
- You may pass `-vvv` at the end of the script to see the output | ||
|
||
5. Assuming you are using the default configuration you can ssh into each of the VMs using the IPs below: | ||
5. Assuming you are using the default configuration you can ssh into the management cluster VM as follows: | ||
|
||
- Core VM Running Metal3: `ssh [email protected]` or `virsh console metal3-core` | ||
- Network Infra VM Running with public internet access: `ssh [email protected]` or `virsh console metal3-network-infra` | ||
|
||
## Development Notes | ||
|
||
- You may pass `-vvv` at the end of the scripts to see more verbose output, or to pass arbitrary additional arguments to ansible-playbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,28 +37,12 @@ EOF | |
virsh net-update egress add-last ip-dhcp-host host.xml --live | ||
``` | ||
|
||
4. Create an XML file containing the following | ||
|
||
```shell | ||
cat << EOF > ~/vbmc/dns.xml | ||
<host ip='192.168.125.100'> | ||
<hostname>media.suse.baremetal</hostname> | ||
</host> | ||
EOF | ||
``` | ||
|
||
5. Live update the egress network once again | ||
|
||
```shell | ||
virsh net-update egress add-last dns-host dns.xml --live | ||
``` | ||
|
||
6. SSH into the metal3-core VM | ||
4. SSH into the metal3-core VM | ||
```shell | ||
ssh [email protected] | ||
``` | ||
|
||
7. Download the example manifests | ||
5. Download the example manifests | ||
|
||
```shell | ||
curl https://raw.githubusercontent.com/suse-edge/metal3-demo/main/docs/example-manifests/dhcp/rke2-control-plane.yaml > rke2-control-plane.yaml | ||
|
@@ -69,13 +53,13 @@ curl https://raw.githubusercontent.com/suse-edge/metal3-demo/main/docs/example-m | |
If you have made your own changes or have differences in your setup, you may need to update the manifests. | ||
- This configuration assumes DHCP-only network setup. | ||
|
||
8. Deploy the control plane | ||
6. Deploy the control plane | ||
|
||
```shell | ||
kubectl apply -f rke2-control-plane.yaml | ||
``` | ||
|
||
9. Verify that the control plane is properly provisioned | ||
7. Verify that the control plane is properly provisioned | ||
|
||
```shell | ||
$ clusterctl describe cluster sample-cluster | ||
|
@@ -86,13 +70,13 @@ $ clusterctl describe cluster sample-cluster | |
│ └─Machine/sample-cluster-chflc True 23m | ||
``` | ||
|
||
10. Deploy the agent | ||
8. Deploy the agent | ||
|
||
```shell | ||
kubectl apply -f rke2-agent.yaml | ||
``` | ||
|
||
11. Verify that the agent is properly provisioned and has successfully joined the cluster | ||
9. Verify that the agent is properly provisioned and has successfully joined the cluster | ||
|
||
```shell | ||
$ clusterctl describe cluster sample-cluster | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.