onedr0p / k3s-homeops-ansible Goto Github PK
View Code? Open in Web Editor NEWBootstrap a k3s cluster on top of Ubuntu 20.04
Bootstrap a k3s cluster on top of Ubuntu 20.04
https://rook.io/docs/rook/v1.2/k8s-pre-reqs.html
tl;dr
sudo apt-get install -y lvm2
and yoink this from my repo
https://github.com/onedr0p/k3s-gitops/blob/master/ansible/roles/system/tasks/main.yml#L6
https://github.com/hashicorp/terraform-github-actions
Explore secret management in GitHub.
Might make configuring more dynamic to allow a variable to pass any k3s install flags to
https://rancher.com/docs/k3s/latest/en/installation/install-options/
Minor consideration would be to check if docker flag is included and then install docker.
Needed to update vault in other stages.
Add to gitignore too.
toggle with variable, default to no
Related to BGP mode.
edit /etc/systemd/logind.conf
change #HandlePowerKey=poweroff
to HandlePowerKey=ignore
this will prevent misclicks with the power button on my NUCs, you can still force poweroff by holding the button
Would be nice to taint the servers running rook-ceph and apply tolerations to the rook-ceph deployments. This way standard workloads can only be ran on the worker nodes without any affinity rules.
Getting errors because it references a local path that is no longer local.
failed: [k3s-0 -> localhost] (item=kubectl apply -f /home/ryan/src/k3s-bootstrap/devops/kube-system/calico/calico.yaml) => {"ansible_loop_var": "item", "attempts": 6, "changed": false, "cmd": ["kubectl", "apply", "-f", "/home/ryan/src/k3s-bootstrap/devops/kube-system/calico/calico.yaml"], "delta": "0:00:00.239140", "end": "2020-02-17 00:55:58.162550", "item": "kubectl apply -f /home/ryan/src/k3s-bootstrap/devops/kube-system/calico/calico.yaml", "msg": "non-zero return code", "rc": 1, "start": "2020-02-17 00:55:57.923410", "stderr": "Unable to connect to the server: x509: certificate signed by unknown authority", "stderr_lines": ["Unable to connect to the server: x509: certificate signed by unknown authority"], "stdout": "", "stdout_lines": []}
Ensure tools are installed locally
...
Prompt to copy sample files if not exists
...
...
...
apt-get --purge -qqy remove apport bcache-tools btrfs-progs byobu cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf friendly-recovery fwupd landscape-common lxd-agent-loader ntfs-3g open-vm-tools plymouth plymouth-theme-ubuntu-text popularity-contest snapd sosreport tmux ubuntu-advantage-tools ufw```
Makes it so having settings specific to our envs for testing, but requires us to update the sample when new vars are added or removed.
FYI I started to work on the k3s on vSphere. I have the infra deployment kinda done using terraform.
I think would be good to join forces here.
Running into errors where vagrant thinks the block device exists
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/Users/devin/Code/k3s-cluster-ansible/k8s-node-10-block.vdi'.
VBoxManage: error: VDI: cannot create image '/Users/devin/Code/k3s-cluster-ansible/k8s-node-10-block.vdi' (VERR_ALREADY_EXISTS)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg *)" at line 510 of file VBoxManageDisk.cpp
hashicorp/vagrant#8107 (comment)
Maybe we should add this in a task to run if shit gets fubared?
They assume local access to the .txt files.
TASK [k3s/master : Restore node-token file access] *****************************
changed: [192.168.88.200]
ERROR! Attempting to decrypt but no vault secrets found
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Default to {{ ansible_user }} and update any local copy jobs to use that user instead.
Use case is for build processes where the remote user is different from the local user.
I believe it's initializing before consul is ready
Probably only want to stay with calico and flannel for now.
Currently set to r610... etc
Something like ... task macos:deps
Ceph isn't always picking up block devices at initial provision. Need to add detection for state of block device with option to clean.
Docker and containerd
Right now it is hardcoded in the ansible scripts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.