Skip to content

Commit

Permalink
more hauler rke2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Aug 10, 2023
1 parent 3aff110 commit 3a32ac6
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 19 deletions.
61 changes: 59 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Complete the following commands on the Internet Connected Server. For the initia

```bash
### Set Variables
export vRancherAirgap=0.7.1
export vRancherAirgap=0.7.2

### Fetch Individual Hauler TARs
mkdir -p /opt/rancher/hauler
Expand Down Expand Up @@ -60,9 +60,66 @@ hauler store serve

### Serve Hauler Registry (serves the oci compliant registry)
hauler serve registry -r registry
```

### Configure and Install Rancher RKE2
```bash
### Set Variables
export vRancherAirgap=0.7.2
export vRKE2=1.25.12
export vPlatform=el9
export IP=0.0.0.0

### Verify Registry Contents
curl -X GET localhost:5000/v2/_catalog
### Replace $IP with Server IP
curl -X GET $IP:5000/v2/_catalog

### Setup Directories
mkdir -p /etc/rancher/rke2
cd /opt/rancher/hauler

### Extract RKE2 Contents from Hauler
hauler store extract hauler/rke2-selinux-0.14-1.${vPlatform}.noarch.rpm:latest
hauler store extract hauler/rke2-common-${vRKE2}.rke2r1-0.${vPlatform}.x86_64.rpm:latest
hauler store extract hauler/rke2-server-${vRKE2}.rke2r1-0.${vPlatform}.x86_64.rpm:latest

### Install RKE2 SELinux Package
yum install -y rke2-selinux-0.14-1.${vPlatform}.noarch.rpm rke2-common-${vRKE2}.rke2r1-0.${vPlatform}.x86_64.rpm rke2-server-${vRKE2}.rke2r1-0.${vPlatform}.x86_64.rpm

### Configure RKE2 Config
### Replace $IP with Server IP
cat << EOF >> /etc/rancher/rke2/config.yaml
token: RancherAirgapRKE2token
system-default-registry: $IP:5000
EOF

### Configure Local Registry
### Replace $IP with Server IP
cat << EOF >> /etc/rancher/rke2/registries.yaml
mirrors:
"$IP:5000":
endpoint:
- "http://$IP:5000"
"docker.io":
endpoint:
- "http://$IP:5000"
EOF

### Enable/Start RKE2 Server
systemctl enable --now rke2-server.service

### Symlink kubectl and containerd
sudo ln -s /var/lib/rancher/rke2/data/v1*/bin/kubectl /usr/bin/kubectl
sudo ln -s /var/run/k3s/containerd/containerd.sock /var/run/containerd/containerd.sock

### Update BASHRC with KUBECONFIG/PATH
cat << EOF >> ~/.bashrc
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
export PATH=$PATH:/var/lib/rancher/rke2/bin:/usr/local/bin/
EOF

### Source BASHRC
source ~/.bashrc
```

WIP WIP WIP
2 changes: 1 addition & 1 deletion hauler/hauler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Hauler (by Rancher Government Solutions)

[hauler/hauler/hauler](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/hauler/hauler) - provides the binary for Hauler.
[hauler/hauler/hauler](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/hauler/hauler) - provides the binary for Hauler.

**Note:** The [Releases](https://github.com/zackbradys/rancher-airgap/releases) page contain the most up-to-date assets.

Expand Down
4 changes: 2 additions & 2 deletions hauler/longhorn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Rancher Longhorn v1.5.1

[hauler/longhorn/rancher-airgap-longhorn.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/longhorn/rancher-airgap-longhorn.yaml) - provides the content manifest for the assets.
[hauler/longhorn/rancher-airgap-longhorn.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/longhorn/rancher-airgap-longhorn.yaml) - provides the content manifest for the assets.

[hauler/longhorn/rancher-airgap-longhorn.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/longhorn/rancher-airgap-longhorn.tar.zst) - provides the compressed content and assets, via the manifest.
[hauler/longhorn/rancher-airgap-longhorn.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/longhorn/rancher-airgap-longhorn.tar.zst) - provides the compressed content and assets, via the manifest.

**Note:** The [Releases](https://github.com/zackbradys/rancher-airgap/releases) page contain the most up-to-date assets.

Expand Down
4 changes: 2 additions & 2 deletions hauler/neuvector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Rancher NeuVector v5.2.0

[hauler/neuvector/rancher-airgap-neuvector.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/neuvector/rancher-airgap-neuvector.yaml) - provides the content manifest for the assets.
[hauler/neuvector/rancher-airgap-neuvector.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/neuvector/rancher-airgap-neuvector.yaml) - provides the content manifest for the assets.

[hauler/neuvector/rancher-airgap-neuvector.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/neuvector/rancher-airgap-neuvector.tar.zst) - provides the compressed content and assets, via the manifest.
[hauler/neuvector/rancher-airgap-neuvector.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/neuvector/rancher-airgap-neuvector.tar.zst) - provides the compressed content and assets, via the manifest.

**Note:** The [Releases](https://github.com/zackbradys/rancher-airgap/releases) page contain the most up-to-date assets.

Expand Down
4 changes: 2 additions & 2 deletions hauler/rancher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

**Cert-Manager v1.7.1:** Included in the Rancher Multi-Cluster Manager content and assets.

[hauler/rancher/rancher-airgap-rancher.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/rancher/rancher-airgap-rancher.yaml) - provides the content manifest for the assets.
[hauler/rancher/rancher-airgap-rancher.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/rancher/rancher-airgap-rancher.yaml) - provides the content manifest for the assets.

[hauler/rancher/rancher-airgap-rancher.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/rancher/rancher-airgap-rancher.tar.zst) - provides the compressed content and assets, via the manifest.
[hauler/rancher/rancher-airgap-rancher.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/rancher/rancher-airgap-rancher.tar.zst) - provides the compressed content and assets, via the manifest.

**Note:** The [Releases](https://github.com/zackbradys/rancher-airgap/releases) page contain the most up-to-date assets.

Expand Down
4 changes: 2 additions & 2 deletions hauler/rke2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Rancher RKE2 v1.25.12

[hauler/rke2/rancher-airgap-rke2.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/rke2/rancher-airgap-rke2.yaml) - provides the content manifest for the assets.
[hauler/rke2/rancher-airgap-rke2.yaml](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/rke2/rancher-airgap-rke2.yaml) - provides the content manifest for the assets.

[hauler/rke2/rancher-airgap-rke2.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.1/hauler/rke2/rancher-airgap-rke2.tar.zst) - provides the compressed content and assets, via the manifest.
[hauler/rke2/rancher-airgap-rke2.tar.zst](https://rancher-airgap.s3.amazonaws.com/0.7.2/hauler/rke2/rancher-airgap-rke2.tar.zst) - provides the compressed content and assets, via the manifest.

**Note:** The [Releases](https://github.com/zackbradys/rancher-airgap/releases) page contain the most up-to-date assets.

Expand Down
16 changes: 8 additions & 8 deletions hauler/scripts/rke2/hauler-rke2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ spec:
name: sha256sum-amd64.txt
- path: https://github.com/rancher/rke2/releases/download/v${vRKE2}%2Brke2r1/rke2.linux-amd64
name: rke2.linux-amd64
- path: https://raw.githubusercontent.com/rancher/rke2/master/install.sh
name: install.sh
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el9.noarch.rpm
name: rke2-selinux-0.14-1.el9.noarch.rpm
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el8.noarch.rpm
name: rke2-selinux-0.14-1.el8.noarch.rpm
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el7.noarch.rpm
name: rke2-selinux-0.14-1.el7.noarch.rpm
- path: https://github.com/rancher/rke2-packaging/releases/download/v${vRKE2}%2Brke2r1.stable.0/rke2-common-${vRKE2}.rke2r1-0.el9.x86_64.rpm
name: rke2-common-${vRKE2}.rke2r1-0.el9.x86_64.rpm
- path: https://github.com/rancher/rke2-packaging/releases/download/v${vRKE2}%2Brke2r1.stable.0/rke2-common-${vRKE2}.rke2r1-0.el8.x86_64.rpm
Expand All @@ -49,14 +57,6 @@ spec:
name: rke2-agent-${vRKE2}.rke2r1-0.el8.x86_64.rpm
- path: https://github.com/rancher/rke2-packaging/releases/download/v${vRKE2}%2Brke2r1.stable.0/rke2-agent-${vRKE2}.rke2r1-0.el7.x86_64.rpm
name: rke2-agent-${vRKE2}.rke2r1-0.el7.x86_64.rpm
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el9.noarch.rpm
name: rke2-selinux-0.14-1.el9.noarch.rpm
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el8.noarch.rpm
name: rke2-selinux-0.14-1.el8.noarch.rpm
- path: https://github.com/rancher/rke2-selinux/releases/download/v0.14.stable.1/rke2-selinux-0.14-1.el7.noarch.rpm
name: rke2-selinux-0.14-1.el7.noarch.rpm
- path: https://raw.githubusercontent.com/rancher/rke2/master/install.sh
name: install.sh
---
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
Expand Down

0 comments on commit 3a32ac6

Please sign in to comment.