updated all code formatting
This commit is contained in:
parent
e4e1283466
commit
1f80db82f4
@ -14,47 +14,44 @@ I noticed the use of some clever CSS/font work, creating a tag and prepending it
|
|||||||
|
|
||||||
The basics of the solution are below.
|
The basics of the solution are below.
|
||||||
|
|
||||||
```scss
|
#!scss
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "icomoon";
|
font-family: "icomoon";
|
||||||
src: url("fonts/icomoon.eot?36cs2a");
|
src: url("fonts/icomoon.eot?36cs2a");
|
||||||
src: url("fonts/icomoon.eot?36cs2a#iefix") format("embedded-opentype"), url("fonts/icomoon.ttf?36cs2a")
|
src: url("fonts/icomoon.eot?36cs2a#iefix") format("embedded-opentype"), url("fonts/icomoon.ttf?36cs2a")
|
||||||
format("truetype"), url("fonts/icomoon.woff?36cs2a") format("woff"),
|
format("truetype"), url("fonts/icomoon.woff?36cs2a") format("woff"),
|
||||||
url("fonts/icomoon.svg?36cs2a#icomoon") format("svg");
|
url("fonts/icomoon.svg?36cs2a#icomoon") format("svg");
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: block;
|
font-display: block;
|
||||||
}
|
}
|
||||||
[class^="my-icons-"],
|
[class^="my-icons-"],
|
||||||
[class*=" my-icons-"] {
|
[class*=" my-icons-"] {
|
||||||
/* use !important to prevent issues with browser extensions that change fonts */
|
/* use !important to prevent issues with browser extensions that change fonts */
|
||||||
font-family: "icomoon" !important;
|
font-family: "icomoon" !important;
|
||||||
speak: never;
|
speak: never;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-variant: normal;
|
font-variant: normal;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
/* Better Font Rendering =========== */
|
/* Better Font Rendering =========== */
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-icons-icon-1:before {
|
.my-icons-icon-1:before {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-icons-icon-2:before {
|
.my-icons-icon-2:before {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
Then to insert the icon where it is wanted one can simply do the following
|
Then to insert the icon where it is wanted one can simply do the following
|
||||||
|
|
||||||
```html
|
`<i class="my-icons-icon-1"></i>`
|
||||||
<i class="my-icons-icon-1"></i>
|
|
||||||
```
|
|
||||||
|
|
||||||
And the icon specified as content in the scss above will sit in the place of the `<i>` tag.
|
And the icon specified as content in the scss above will sit in the place of the `<i>` tag.
|
||||||
|
|
||||||
@ -72,10 +69,6 @@ And with that, I had found our solution.
|
|||||||
|
|
||||||
Icomoon is really a magical black box but what it produces is brilliant.
|
Icomoon is really a magical black box but what it produces is brilliant.
|
||||||
|
|
||||||
```
|
|
||||||
detail in long how solution works
|
|
||||||
```
|
|
||||||
|
|
||||||
Source controlling the processed files and building the font and css into an npm package that we store in a private registry worked great and we have been using the same solution since, approx. 8 months I think. If ever you need a simple way of producing your own set of easily usable icons for a project, I suggest Icomoon.
|
Source controlling the processed files and building the font and css into an npm package that we store in a private registry worked great and we have been using the same solution since, approx. 8 months I think. If ever you need a simple way of producing your own set of easily usable icons for a project, I suggest Icomoon.
|
||||||
|
|
||||||
-ink.
|
-ink.
|
||||||
|
|||||||
@ -30,24 +30,21 @@ Both network and hostname can be setup by mounting rootfs and manually editing/a
|
|||||||
|
|
||||||
Example netplan '10-config.yaml':
|
Example netplan '10-config.yaml':
|
||||||
|
|
||||||
```yaml
|
#!yaml
|
||||||
network:
|
network:
|
||||||
version: 2
|
version: 2
|
||||||
renderer: networkd
|
renderer: networkd
|
||||||
ethernets:
|
ethernets:
|
||||||
eth0:
|
eth0:
|
||||||
addresses: [192.168.0.XXX/16]
|
addresses: [192.168.0.XXX/16]
|
||||||
gateway4: 192.168.0.1
|
gateway4: 192.168.0.1
|
||||||
nameservers:
|
nameservers:
|
||||||
addresses: [192.168.0.1, 1.1.1.1]
|
addresses: [192.168.0.1, 1.1.1.1]
|
||||||
search: [mydomain]
|
search: [mydomain]
|
||||||
```
|
|
||||||
|
|
||||||
Also set timezone if you want.
|
Also set timezone if you want.
|
||||||
|
|
||||||
```shell
|
`sudo timedatectl set-timezone Australia/Adelaide`
|
||||||
sudo timedatectl set-timezone Australia/Adelaide
|
|
||||||
```
|
|
||||||
|
|
||||||
In my case the following was used:
|
In my case the following was used:
|
||||||
|
|
||||||
@ -64,62 +61,56 @@ We must rebuild kernel with updated options so that cgroup_pids is enabled. Hard
|
|||||||
|
|
||||||
note that the following tools are required for the build: bison, flex, libssl-dev, and bc
|
note that the following tools are required for the build: bison, flex, libssl-dev, and bc
|
||||||
|
|
||||||
```shell
|
`apt install bison flex libssl-dev bc -y`
|
||||||
apt install bison flex libssl-dev bc -y
|
|
||||||
```
|
|
||||||
|
|
||||||
### The K3S install
|
### The K3S install
|
||||||
|
|
||||||
Run the following on all nodes:
|
Run the following on all nodes:
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
iptables -F \
|
iptables -F \
|
||||||
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
||||||
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
||||||
&& reboot
|
&& reboot
|
||||||
|
|
||||||
apt update; apt upgrade -y; apt autoremove -y; apt clean; apt install docker.io curl -y
|
apt update; apt upgrade -y; apt autoremove -y; apt clean; apt install docker.io curl -y
|
||||||
reboot
|
reboot
|
||||||
|
|
||||||
systemctl start docker
|
systemctl start docker
|
||||||
systemctl enable docker
|
systemctl enable docker
|
||||||
|
|
||||||
systemctl status docker
|
systemctl status docker
|
||||||
|
|
||||||
# Be sure that the firewall is disabled for ease
|
# Be sure that the firewall is disabled for ease
|
||||||
ufw disable
|
ufw disable
|
||||||
```
|
|
||||||
|
|
||||||
Then run the following only on the master node:
|
Then run the following only on the master node:
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
# for master
|
# for master
|
||||||
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --docker
|
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --docker
|
||||||
|
|
||||||
# check its running
|
# check its running
|
||||||
systemctl status k3s
|
systemctl status k3s
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
|
|
||||||
# Get token from master, make sure to store it somewhere
|
# Get token from master, make sure to store it somewhere
|
||||||
cat /var/lib/rancher/k3s/server/node-token
|
cat /var/lib/rancher/k3s/server/node-token
|
||||||
```
|
|
||||||
|
|
||||||
Then run the following on the worker nodes, updating the command for each:
|
Then run the following on the worker nodes, updating the command for each:
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
# for workers
|
# for workers
|
||||||
# Fill this out ...
|
# Fill this out ...
|
||||||
curl -sfL http://get.k3s.io | K3S_URL=https://<master_IP>:6443 K3S_TOKEN=<join_token> K3S_NODE_NAME="odroid-mc1-X" sh -s - --docker
|
curl -sfL http://get.k3s.io | K3S_URL=https://<master_IP>:6443 K3S_TOKEN=<join_token> K3S_NODE_NAME="odroid-mc1-X" sh -s - --docker
|
||||||
|
|
||||||
systemctl status k3s-agent
|
systemctl status k3s-agent
|
||||||
```
|
|
||||||
|
|
||||||
And thus you should be done, check the master node to see:
|
And thus you should be done, check the master node to see:
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
# Check node was added on master
|
# Check node was added on master
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
```
|
|
||||||
|
|
||||||
And all should be up and running correctly, it was for me at least.
|
And all should be up and running correctly, it was for me at least.
|
||||||
|
|
||||||
@ -137,10 +128,10 @@ Once these have been set up with ip addresses and hostnames (odroid-n2, odroid-m
|
|||||||
|
|
||||||
Either the following to set up users and access:
|
Either the following to set up users and access:
|
||||||
|
|
||||||
```yml
|
#!yml
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: create the 'kuber' user
|
- name: create the 'kuber' user
|
||||||
user: name=kuber append=yes state=present createhome=yes bash=/bin/bash
|
user: name=kuber append=yes state=present createhome=yes bash=/bin/bash
|
||||||
|
|
||||||
@ -154,57 +145,49 @@ Either the following to set up users and access:
|
|||||||
authorized_key: user=kuber key="{{item}}"
|
authorized_key: user=kuber key="{{item}}"
|
||||||
with_file:
|
with_file:
|
||||||
- ~/.ssh/id_rsa.pub
|
- ~/.ssh/id_rsa.pub
|
||||||
```
|
|
||||||
|
|
||||||
Or if you already set up users:
|
Or if you already set up users:
|
||||||
|
|
||||||
```yml
|
#!yml
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: set up authorised keys for the 'root' user
|
- name: set up authorised keys for the 'root' user
|
||||||
authorized_key: user=root key="{{item}}"
|
authorized_key: user=root key="{{item}}"
|
||||||
with_file:
|
with_file:
|
||||||
- ~/.ssh/id_rsa.pub
|
- ~/.ssh/id_rsa.pub
|
||||||
```
|
|
||||||
|
|
||||||
The above can be used with a hosts file such as the following
|
The above can be used with a hosts file such as the following
|
||||||
|
|
||||||
```
|
[masters]
|
||||||
[masters]
|
master ansible_host=192.168.0.XXX ansible_user=<user> ansible_ssh_pass=<password>
|
||||||
master ansible_host=192.168.0.XXX ansible_user=<user> ansible_ssh_pass=<password>
|
|
||||||
|
|
||||||
[workers]
|
[workers]
|
||||||
worker1 ansible_host=192.168.0.XXX ansible_user=<user> ansible_ssh_pass=<password>
|
worker1 ansible_host=192.168.0.XXX ansible_user=<user> ansible_ssh_pass=<password>
|
||||||
worker2...
|
worker2...
|
||||||
...
|
...
|
||||||
|
|
||||||
[all:vars]
|
[all:vars]
|
||||||
ansible_python_interpreter=/usr/bin/python3
|
ansible_python_interpreter=/usr/bin/python3
|
||||||
```
|
|
||||||
|
|
||||||
Then the following commands:
|
Then the following commands:
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
sudo iptables -F \
|
sudo iptables -F \
|
||||||
&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
||||||
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
||||||
&& sudo reboot
|
&& sudo reboot
|
||||||
```
|
|
||||||
|
|
||||||
useful command formatted from step 2.2.1 of reference material [here](https://learn.networkchuck.com/courses/take/ad-free-youtube-videos/lessons/26093614-i-built-a-raspberry-pi-super-computer-ft-kubernetes-k3s-cluster-w-rancher)
|
useful command formatted from step 2.2.1 of reference material [here](https://learn.networkchuck.com/courses/take/ad-free-youtube-videos/lessons/26093614-i-built-a-raspberry-pi-super-computer-ft-kubernetes-k3s-cluster-w-rancher)
|
||||||
|
|
||||||
Then the following on the master node:
|
Then the following on the master node:
|
||||||
|
|
||||||
```shell
|
`curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -`
|
||||||
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
|
|
||||||
```
|
|
||||||
|
|
||||||
Then on the master node grab its node token
|
Then on the master node grab its node token
|
||||||
|
|
||||||
```shell
|
`sudo cat /var/lib/rancher/k3s/server/node-token`
|
||||||
sudo cat /var/lib/rancher/k3s/server/node-token
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run the following on each of the workers:
|
Then run the following on each of the workers:
|
||||||
(note in my case curl was not installed)
|
(note in my case curl was not installed)
|
||||||
@ -215,11 +198,10 @@ YOURTOKEN = token from above
|
|||||||
|
|
||||||
servername = unique name for node (I use hostname)
|
servername = unique name for node (I use hostname)
|
||||||
|
|
||||||
```shell
|
#!shell
|
||||||
curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
||||||
|
|
||||||
# I used
|
# I used
|
||||||
apt install curl -y && curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
apt install curl -y && curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
||||||
```
|
|
||||||
|
|
||||||
Sadly this is where my notes ended as, although the install worked, all of the system pods were failing and thus I moved on to the method listed above.
|
Sadly this is where my notes ended as, although the install worked, all of the system pods were failing and thus I moved on to the method listed above.
|
||||||
|
|||||||
Reference in New Issue
Block a user