Skip to content

Instantly share code, notes, and snippets.

View meetmatt's full-sized avatar
📡

Yuriy Golikov meetmatt

📡
View GitHub Profile

Kubernetes

Juju

Install from snap

sudo snap install juju --classic

Initialize Openstack Cloud

00:05:32 execve("/usr/bin/ssh", ["ssh", "-v", "[email protected]", "-p", "2222"], 0x7fff1a744028 /* 16 vars */) = 0
00:05:32 brk(NULL) = 0x56208d3ff000
00:05:32 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffdcdc36cc0) = -1 EINVAL (Invalid argument)
00:05:32 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
00:05:32 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
00:05:32 fstat(3, {st_mode=S_IFREG|0644, st_size=36797, ...}) = 0
00:05:32 mmap(NULL, 36797, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1051810000
00:05:32 close(3) = 0
00:05:32 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
00:05:32 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@p\0\0\0\0\0\0"..., 832) = 832
23:50:16 execve("/usr/sbin/sshd", ["/usr/sbin/sshd", "-r", "-d", "-p", "2222"], 0x7ffc48636e98 /* 26 vars */) = 0
23:50:16 brk(NULL) = 0x55897abb0000
23:50:16 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffce89a89a0) = -1 EINVAL (Invalid argument)
23:50:16 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
23:50:16 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
23:50:16 fstat(3, {st_mode=S_IFREG|0644, st_size=23216, ...}) = 0
23:50:16 mmap(NULL, 23216, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f73d378e000
23:50:16 close(3) = 0
23:50:16 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
23:50:16 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 ;\0\0\0\0\0\0"..., 832) = 832
@meetmatt
meetmatt / openstack-ssh-issue.md
Last active July 22, 2021 06:30
openstack - cannot ssh from host to vm instance

Setup

Host: Ubuntu 20.04
OVS bridge: br-ex
Openstack security group: allow all ip4.
Single network interface: 192.168.1.100, gateway 192.168.1.1 (home router).
The IP from the physical interface is moved to br-ex, physical nic added as port (that way I can allocate floating IPs from the home router's network 192.168.1.1/24).
Openstack: two networks, private (10.10.0.0/24), public (192.168.1.1/24).
Virual router (10.10.0.1 / 192.168.1.212) provides NAT to private network.
On the openstack host there's a manually added routing table: 10.10.0.0/24 via 192.168.1.212.
Instance: 10.10.0.135, Ubuntu 20.04 cloud image, default cloud config, except that I enabled root password to debug.

@meetmatt
meetmatt / 01-openstack.md
Last active November 10, 2024 19:57
Scripted version of the how-to article by Rodrigo Nascimento "OpenStack Single-Node (MicroStack)" https://connection.rnascimento.com/2021/03/08/openstack-single-node-microstack/ Part 2 with Kubernetes can be found here https://gist.github.com/meetmatt/92167f8cc61e85346bbb97b4501d8d22

Openstack

OS configuration

Add user to sudoers without password

echo 'user ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/user

Kernel optimizations

url -kvX POST -A "GitHub-Hookshot/github" -H "Content-Type:application/json" -H "X-Github-Event:push" -d @hook.json $URL
@meetmatt
meetmatt / gist:d5dd2ecae37fbabb483dffba2d6dbec6
Created November 3, 2016 13:33
Show installed packages reverse sorted by size in alpine
apk info | xargs -n1 -I{} apk info -s {} | xargs -n4 | awk '{print $4,$1}' | sort -rn