Skip to content

Instantly share code, notes, and snippets.

@tnk4on
tnk4on / ocp4_upi_install.sh
Last active June 25, 2020 14:05
OCP4.5 RC2 UPI Install for Baremetal
# ocp4_upi_install.sh
### 前提条件 ###
## 参考ブログ記事: https://rheb.hatenablog.com/entry/openshift41-baremetal-upi
# 踏み台サーバーの構築
# SSHキーペア作成
# インストーラーバイナリ、インストールイメージの入手
# インストール設定ファイルの作成
# ------------------------------------------------------ #
@tnk4on
tnk4on / ocs4_and_localstorage_setup.sh
Last active June 26, 2020 16:33
OCS4 with LocalStorage on 3-node OCP4
# ocs4_and_localstorage_setup.sh
### 前提条件 ###
# OCP4.5構築済み(3-nodeクラスター)
# OCPクラスターはシャットダウン済み
# ------------------------------------------------------ #
### 1. インストール事前作業 ###
-r--r--r-- 6 root root 13703985 Jun 14 13:19 applmgmt-6.7.0-8832884.x86_64.rpm
-r--r--r-- 6 root root 47141 Jun 14 13:18 applmgmt-cloudvm-6.7.0-8832884.x86_64.rpm
-r--r--r-- 2 root root 4903 Jun 14 13:18 buildInfo
-r--r--r-- 4 root root 91784451 Jun 14 13:19 cis-upgrade-runner-6.7.0-8832884.x86_64.rpm
-r--r--r-- 2 root root 901 Jun 14 13:18 cloudvm_disk.cfg
-r--r--r-- 2 root root 39009 Jun 14 13:18 common-install.sh
-r--r--r-- 2 root root 34329178 Jun 14 13:17 dbcc-1.0.0-1.noarch.rpm
-r--r--r-- 2 root root 211 Jun 14 13:18 deployment_types.json
-r-xr-xr-x 2 root root 8140 Jun 14 13:18 disk_utils.sh
-r--r--r-- 2 root root 148387689 Jun 14 13:18 drm-apps-linux6.7.0-8832884.zip
-r--r--r-- 6 root root 13703985 Jun 14 13:19 applmgmt-6.7.0-8832884.x86_64.rpm
-r--r--r-- 6 root root 47141 Jun 14 13:18 applmgmt-cloudvm-6.7.0-8832884.x86_64.rpm
-r--r--r-- 2 root root 4903 Jun 14 13:18 buildInfo
-r--r--r-- 4 root root 91784451 Jun 14 13:19 cis-upgrade-runner-6.7.0-8832884.x86_64.rpm
-r--r--r-- 2 root root 901 Jun 14 13:18 cloudvm_disk.cfg
-r--r--r-- 2 root root 39009 Jun 14 13:18 common-install.sh
-r--r--r-- 2 root root 34329178 Jun 14 13:17 dbcc-1.0.0-1.noarch.rpm
-r--r--r-- 2 root root 211 Jun 14 13:18 deployment_types.json
-r-xr-xr-x 2 root root 8140 Jun 14 13:18 disk_utils.sh
-r--r--r-- 2 root root 148387689 Jun 14 13:18 drm-apps-linux6.7.0-8832884.zip
@tnk4on
tnk4on / The results of "podman inspect dnsmasq" in the CRC VM for Mac
Last active September 21, 2020 08:28
CRC(CodeReady Containers) for Mac runs a DNS server for name resolution in the CRC VM on hyperkit. The DNS server is run as a container by Podman and starts dnsmasq. On the Mac, *.testing domain name resolution is directed to the CRC VM by "/etc/resolver".
$ export CRC_IP=$(crc ip)
$ ssh -i ~/.crc/machines/crc/id_rsa core@$CRC_IP
[core@crc-zqfk6-master-0 ~]$ sudo podman inspect dnsmasq
[
{
"Id": "ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f",
"Created": "2020-09-20T06:28:57.900735714Z",
"Path": "/usr/sbin/dnsmasq",
"Args": [
"--keep-in-foreground"
@tnk4on
tnk4on / The dnsmasq configuration file that runs on the CRC VM in CRC for Mac
Last active September 20, 2020 14:06
This is the dnsmasq configuration file (/var/srv/dnsmasq.conf) that runs on the CRC VM for Mac.
$ export CRC_IP=$(crc ip)
$ ssh -i ~/.crc/machines/crc/id_rsa core@$CRC_IP
[core@crc-zqfk6-master-0 ~]$ cat /var/srv/dnsmasq.conf
user=root
port= 53
bind-interfaces
expand-hosts
log-queries
srv-host=_etcd-server-ssl._tcp.crc.testing,etcd-0.crc.testing,2380,10
local=/crc.testing/
@tnk4on
tnk4on / Launch the CodeReady Containers by specifying the name server
Last active September 21, 2020 16:24
If the host running the CRC has complex name resolution settings, you can start the CRC by specifying a nameserver.
$ crc start -n 192.168.1.1
INFO Checking if oc binary is cached
INFO Checking if podman remote binary is cached
INFO Checking if goodhosts binary is cached
INFO Checking minimum RAM requirements
INFO Checking if running as non-root
INFO Checking if HyperKit is installed
INFO Checking if crc-driver-hyperkit is installed
INFO Checking file permissions for /etc/hosts
INFO Checking file permissions for /etc/resolver/testing
# Fedora32
[user@localhost CRC]$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.0.1
[user@localhost CRC]$
[user@localhost CRC]$ cat /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf
[main]
dns=dnsmasq
[user@localhost CRC]$ cat /etc/NetworkManager/dnsmasq.d/crc.conf
$ cat build.sh
container=$(buildah from alpine)
mnt=$(buildah mount $container)
set -ex; mkdir -p $mnt/work; touch $mnt/work/foo
container2=$(buildah from alpine)
mnt2=$(buildah mount $container2)
set -ex;mkdir -p $mnt2/work
cp $mnt/work/foo $mnt2/work/
@tnk4on
tnk4on / build-and-setup-podman-on-fedora-lima.md
Last active January 14, 2024 09:34
Build Podman with Fedora running on lima and use the container on Podman as a DevContainer from VS Code Remote-Containers.

DevContainer with Podman on Fedora on lima

Environment

  • macOS: Big Sur v11.5.2
  • VS Code: Version: v1.60.0
  • Remote - Containers: v0.194.0
  • lima: v0.6.3

1. Install Podman and lima