https://docs.k3s.io/installation/airgap#manually-deploy-images-method
https://github.com/k3s-io/k3s/
This file contains hidden or 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
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=\"$(dpkg --print-architecture)\" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| # Update and install Docker CLI | |
| apt-get update && apt-get install -y docker-ce-cli | |
This file contains hidden or 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
| Based on this guide | |
| https://stackoverflow.com/questions/23259843/how-to-route-traffic-reverse-proxy-with-haproxy-based-on-request-body | |
| frontend http-in | |
| bind *:80 | |
| option http-buffer-request | |
| acl redirect_pingpong req.body -m reg [insert your regular expression here] | |
| use_backend pingpong_backend if redirect_pingpong | |
| default_backend web_bk |
This file contains hidden or 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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This is an example of Envoy TCP Proxy from localhost:10000 to www.google.com:80.
See also https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/listeners/tcp_proxy.
To run a proxy:
% docker run --rm getenvoy/envoy:stable --version
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "github.com/tsenart/vegeta/lib" | |
| ) | |
| func testRate(rate int, sla time.Duration) bool { |
This file contains hidden or 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
| - hosts: all | |
| name: get group ips in one line | |
| gather_facts: false | |
| vars: | |
| all_servers_ip: "{{groups['all'] | map('extract',hostvars,['ansible_ssh_host']) | join(',') }}" | |
| tasks: | |
| - debug: | |
| msg: "{{all_servers_ip}}" |
This file contains hidden or 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
| $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
This file contains hidden or 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
| stages: | |
| - build | |
| - push | |
| - cleanup | |
| build: | |
| stage: build | |
| variables: | |
| REGISTRY_SERVER: foo.bar | |
| IMAGE_NAME: vrutkovs-public/openshift-ansible-testing |
NewerOlder