Skip to content

Instantly share code, notes, and snippets.

View sshnaidm's full-sized avatar
🍺
it's coding

Sergey sshnaidm

🍺
it's coding
View GitHub Profile
@sshnaidm
sshnaidm / crc_ssh.sh
Created April 3, 2022 22:04
CRC VM ssh login
CRC IP - 192.168.130.11
SSH key - ~/.crc/machines/crc/id_ecdsa
username - core
ssh -i ~/.crc/machines/crc/id_ecdsa -o StrictHostKeyChecking=no [email protected]
# alias crcssh="ssh -i ~/.crc/machines/crc/id_ecdsa -o StrictHostKeyChecking=no core@`crc ip`"
@sshnaidm
sshnaidm / repo-setup9.sh
Last active January 11, 2022 11:16
Set openstack repos for CentOS 9
#!/bin/sh
PROXY=${PROXY:-https://trunk.rdoproject.org}
DIRTMP=${1:-/tmp/blintz}
mkdir -p $DIRTMP
curl -o $DIRTMP/delorean.repo ${PROXY}/centos9-master/current-tripleo/delorean.repo
curl -o $DIRTMP/delorean-deps.repo ${PROXY}/centos9-master/delorean-deps.repo
curl -o $DIRTMP/delorean-current.repo ${PROXY}/centos9-master/component/tripleo/current/delorean.repo
@sshnaidm
sshnaidm / build_podman_c9.sh
Created January 6, 2022 14:17
Build podman on CentOS 9 stream
sudo dnf install golang libseccomp-devel libseccomp gpgme gpgme-devel
export GOPATH=$HOME/go
mkdir -p $GOPATH/src/github.com/containers
git clone https://github.com/containers/podman $GOPATH/src/github.com/containers/podman
cd $GOPATH/src/github.com/containers/podman/
make BUILDTAGS="selinux btrfs_noversion remoteclient systemd varlink seccomp exclude_graphdriver_devicemapper $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh) $(hack/ostree_tag.sh) $(hack/selinux_tag.sh)"
@sshnaidm
sshnaidm / c9_repos.sh
Last active November 17, 2021 10:53
CentOS repositories for OS
sudo curl https://trunk.rdoproject.org/centos9-master/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
sudo curl https://trunk.rdoproject.org/centos9-master/current-tripleo/delorean.repo -o /etc/yum.repos.d/delorean.repo
# sudo https://trunk.rdoproject.org/centos9-master/current/delorean.repo -o /etc/yum.repos.d/delorean.repo
@sshnaidm
sshnaidm / start_openshift.md
Last active March 15, 2022 13:47
Run CRC with openshift on remote server
  1. Download form https://crc.dev/crc/
wget https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
  1. Start CRC
crc setup
crs start -m 32768 -c 8 # for example a 32GiB with 8 cpus
  1. Install haproxy
@sshnaidm
sshnaidm / remote_crc.md
Created August 11, 2021 01:31 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

@sshnaidm
sshnaidm / kubeadm_docker.sh
Created June 15, 2021 12:51
Kubeadm + docker install on Ubuntu 20
#!/bin/bash
# Install docker
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
@sshnaidm
sshnaidm / dreampie_install.sh
Created December 14, 2020 08:11
Install Dreampie on Fedora 33
dnf install -y pygobject2 pygobject2-devel python3-gobject-devel
dnf install -y glade-devel glade-libs
dnf install -y pygtk2 pygtk2-devel
# extract glade.so
sudo cp ~/tmp/gtk-2.0/gtk/glade.so /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/
dnf install -y gtksourceview2-devel gtksourceview2 -y
wget https://rpmfind.net/linux/mageia/distrib/6/x86_64/media/core/release/python-gtksourceview-2.10.1-13.mga6.x86_64.rpm
# extract gtksourceview2 RPM
sudo cp ~/tmp/gtksourceview2.so /usr/lib64/python2.7/site-packages/
@sshnaidm
sshnaidm / podman_mirror_docker.sh
Last active October 27, 2020 04:10
Podman to work with docker mirrors
# on client
cat << EOF >/etc/containers/registries.conf
unqualified-search-registries = ['docker.io']
[[registry]]
prefix = "docker.io"
insecure = true
location = "docker.io"
[[registry.mirror]]
insecure = true
@sshnaidm
sshnaidm / ansible-collections-openstack.spec
Last active August 6, 2020 11:02
RPM spec for openstack ansible collection
# Macros for py2/py3 compatibility
%if 0%{?fedora} || 0%{?rhel} > 7
%global pyver %{python3_pkgversion}
%else
%global pyver 2
%endif
%global pyver_install %{expand:%{py%{pyver}_install}}
%global pyver_build %{expand:%{py%{pyver}_build}}
%global pyver_sitelib %{expand:%{python%{pyver}_sitelib}}