-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This adds new stack deployment option using Helm and K3D. ## Why is this needed Fixes: # ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information
Showing
48 changed files
with
452 additions
and
55 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
LIBVIRT_HOST_IP=192.168.56.1 | ||
PROVISIONER_IP=192.168.56.4 | ||
LOADBALANCER_IP=192.168.56.5 | ||
MACHINE1_IP=192.168.56.43 | ||
MACHINE1_MAC=08:00:27:9e:f5:3a | ||
|
||
#USE_POSTGRES=true | ||
USE_POSTGRES= | ||
|
||
# USE_HELM=true | ||
USE_HELM=true | ||
|
||
# https://github.com/tinkerbell/charts/pkgs/container/charts%2Fstack | ||
HELM_CHART_VERSION=0.1.1 |
47 changes: 35 additions & 12 deletions
47
deploy/vagrant/Vagrantfile → deploy/infrastructure/vagrant/Vagrantfile
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
File renamed without changes.
File renamed without changes.
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
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,27 @@ | ||
# These must be defined above/before first use. | ||
# Use of these variables *must* be in ${} form, otherwise docker-compose won't substitute when processing this file | ||
vOSIE=v0.7.0 | ||
vTINK=sha-16186501 | ||
|
||
# Probably don't want to mess with these, unless you know you do | ||
FACILITY=onprem | ||
TINKERBELL_REGISTRY_PASSWORD=Admin1234 | ||
TINKERBELL_REGISTRY_USERNAME=admin | ||
TINKERBELL_TLS= false | ||
|
||
# Can be set to your own hook builds | ||
OSIE_DOWNLOAD_URLS=https://github.com/tinkerbell/hook/releases/download/${vOSIE}/hook_x86_64.tar.gz,https://github.com/tinkerbell/hook/releases/download/${vOSIE}/hook_aarch64.tar.gz | ||
|
||
TINKERBELL_HARDWARE_MANIFEST=/manifests/hardware/hardware.json | ||
TINKERBELL_TEMPLATE_MANIFEST=/manifests/template/ubuntu.yaml | ||
|
||
TINKERBELL_CLIENT_IP=192.168.56.43 | ||
TINKERBELL_CLIENT_MAC=08:00:27:9e:f5:3a | ||
TINKERBELL_HOST_IP=192.168.56.4 | ||
|
||
# Images used by docker-compose natively or in terraform/vagrant, update if necessary | ||
BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-505785d7 | ||
HEGEL_IMAGE=quay.io/tinkerbell/hegel:sha-592588cf | ||
TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:${vTINK} | ||
TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:${vTINK} | ||
TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:${vTINK} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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,34 @@ | ||
apiVersion: "tinkerbell.org/v1alpha1" | ||
kind: Hardware | ||
metadata: | ||
name: machine1 | ||
spec: | ||
disks: | ||
- device: $DISK_DEVICE | ||
metadata: | ||
facility: | ||
facility_code: sandbox | ||
instance: | ||
hostname: "machine1" | ||
id: "$TINKERBELL_CLIENT_MAC" | ||
operating_system: | ||
distro: "ubuntu" | ||
os_slug: "ubuntu_20_04" | ||
version: "20.04" | ||
interfaces: | ||
- dhcp: | ||
arch: x86_64 | ||
hostname: machine1 | ||
ip: | ||
address: $TINKERBELL_CLIENT_IP | ||
gateway: $TINKERBELL_CLIENT_GW | ||
netmask: 255.255.255.0 | ||
lease_time: 86400 | ||
mac: $TINKERBELL_CLIENT_MAC | ||
name_servers: | ||
- 1.1.1.1 | ||
- 8.8.8.8 | ||
uefi: false | ||
netboot: | ||
allowPXE: true | ||
allowWorkflow: true |
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,89 @@ | ||
apiVersion: "tinkerbell.org/v1alpha1" | ||
kind: Template | ||
metadata: | ||
name: ubuntu-focal | ||
spec: | ||
data: | | ||
version: "0.1" | ||
name: ubuntu_Focal | ||
global_timeout: 1800 | ||
tasks: | ||
- name: "os-installation" | ||
worker: "{{.device_1}}" | ||
volumes: | ||
- /dev:/dev | ||
- /dev/console:/dev/console | ||
- /lib/firmware:/lib/firmware:ro | ||
actions: | ||
- name: "stream-ubuntu-image" | ||
image: quay.io/tinkerbell-actions/image2disk:v1.0.0 | ||
timeout: 600 | ||
environment: | ||
DEST_DISK: {{ index .Hardware.Disks 0 }} | ||
IMG_URL: "http://$TINKERBELL_HOST_IP:8080/focal-server-cloudimg-amd64.raw.gz" | ||
COMPRESSED: true | ||
- name: "grow-partition" | ||
image: quay.io/tinkerbell-actions/cexec:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
CHROOT: y | ||
DEFAULT_INTERPRETER: "/bin/sh -c" | ||
CMD_LINE: "growpart {{ index .Hardware.Disks 0 }} 1 && resize2fs {{ index .Hardware.Disks 0 }}1" | ||
- name: "install-openssl" | ||
image: quay.io/tinkerbell-actions/cexec:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
CHROOT: y | ||
DEFAULT_INTERPRETER: "/bin/sh -c" | ||
CMD_LINE: "apt -y update && apt -y install openssl" | ||
- name: "create-user" | ||
image: quay.io/tinkerbell-actions/cexec:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
CHROOT: y | ||
DEFAULT_INTERPRETER: "/bin/sh -c" | ||
CMD_LINE: "useradd -p $(openssl passwd -1 tink) -s /bin/bash -d /home/tink/ -m -G sudo tink" | ||
- name: "enable-ssh" | ||
image: quay.io/tinkerbell-actions/cexec:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
CHROOT: y | ||
DEFAULT_INTERPRETER: "/bin/sh -c" | ||
CMD_LINE: "ssh-keygen -A; systemctl enable ssh.service; sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config" | ||
- name: "disable-apparmor" | ||
image: quay.io/tinkerbell-actions/cexec:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
CHROOT: y | ||
DEFAULT_INTERPRETER: "/bin/sh -c" | ||
CMD_LINE: "systemctl disable apparmor; systemctl disable snapd" | ||
- name: "write-netplan" | ||
image: quay.io/tinkerbell-actions/writefile:v1.0.0 | ||
timeout: 90 | ||
environment: | ||
DEST_DISK: {{ index .Hardware.Disks 0 }}1 | ||
FS_TYPE: ext4 | ||
DEST_PATH: /etc/netplan/config.yaml | ||
CONTENTS: | | ||
network: | ||
version: 2 | ||
renderer: networkd | ||
ethernets: | ||
id0: | ||
match: | ||
name: en* | ||
dhcp4: true | ||
UID: 0 | ||
GID: 0 | ||
MODE: 0644 | ||
DIRMODE: 0755 |
Oops, something went wrong.