Red Hatã§ã½ãªã¥ã¼ã·ã§ã³ã¢ã¼ããã¯ãããã¦ããç°ä¸å¸æ©(@tnk4on)ã§ãã
ã¤ãã«ãã®æãæ¥ã¾ããï¼Apple Siliconæè¼Macï¼ä»¥ä¸ãARM Macï¼ã§OpenShiftãåãããã«ãªãã¾ããï¼æ¬è¨äºã§ã¯èª°ã§ãå®è¡å¯è½ãªã¤ã³ã¹ãã¼ã«æé ã解説ãã¾ãã ãããå ¨ä¸çOpenShiftã¤ã³ã¹ãã¼ã«æ好家ã®çãããã¬ãããã©ã¤ï¼
ï¼ãç´æãæ¬è¨äºã®å 容ã¯æ¤è¨¼ãç®çã¨ãã¦ãããæ¬çªç°å¢ã§ã®ä½¿ç¨ãå ¬å¼ãªãµãã¼ããä¿è¨¼ãããã®ã§ã¯ããã¾ãããï¼
-ç®æ¬¡-
- Hello, Apple Silicon
- SNO on ARM Macã®æ§ææ¦è¦
- ã¤ã³ã¹ãã¼ã«æ¹æ³
- Gitãªãã¸ããªã®ã¯ãã¼ã³
- ã¤ã³ã¹ãã¼ã©ã¼ã¨OpenShift CLIã®å ¥æ
- RHCOS ISOã®å ¥æ
- DNSãµã¼ãã¼ã®å®è¡
- Macãã¹ãã®è¨å®å¤æ´
- RHCOS ISOã®ãã¹ãèµ·åã¨ããã¤ã¹åã®ç¢ºèª
- install-config.yamlã®æ´æ°
- Ignitionãã¡ã¤ã«ã®ä½æ
- Ignitionãã¡ã¤ã«ãRHCOS ISOã¸åãè¾¼ã
- OpenShiftãã¼ãã®éçIPã¢ãã¬ã¹è¨å®
- RHCOS ISOã®èµ·å
- ï¼åèï¼ã¤ã³ã¹ãã¼ã«ç¶æ³ã®ã¢ãã¿ãªã³ã°
- ç°å¢ã®ãªã»ãã
- ã¤ã³ã¹ãã¼ã«å¾ã®ç¶æ³
- One more thing ?
Hello, Apple Silicon
2020å¹´11æã«M1ããããçºè¡¨ããã¦ä»¥éãARM Macã¯é«æ§è½ãé«å¹çãªã³ã³ãã¥ã¼ã¿ã¼ã¨ãã¦æ³¨ç®ãéãã¦ãã¾ãã ã¨ãããããã®ARM Macä¸ã§OpenShiftãåããåãçµã¿ã«ã¯ããã¾ã§åé¡ãããã¾ããã
é¢é£ããKCSã¨ãã¦ã¯ä¸è¨ãããã¾ãã
Can I run RHEL virtualized in a Mac using the Apple M1 processor? - Red Hat Customer Portal
è¦ç´ããã¨ã
- Apple M1ãããï¼å¾ç¶ã®M2ãåæ§ï¼ã¯4Kã¾ãã¯16Kã®ãã¼ã¸ãµã¤ãºã使ç¨ãã¦ãã
- aarch64çRHEL 7/8ã¯64Kãã¼ã¸ãµã¤ãºç¨ã«ã³ã³ãã¤ã«ããã¦ãã
ãã®éãã«ããARM Macã§ã¯RHEL 7/8 ãä»®æ³ãã·ã³ã¨ãã¦å®è¡ã§ããªãã¨ããåé¡ãçºçãã¦ãã¾ãã
ç¾è¡ã®OpenShift 4ã¯2019å¹´ã«ãªãªã¼ã¹ããã¦ä»¥éããã¼ã¹OSã®Red Hat Enterprise Linux CoreOS(以ä¸ãRHCOS) ã¯RHEL 8ããã¼ã¹ã¨ãã¦ãªãªã¼ã¹ããã¦ãã¾ããããã®ãããARM Macã§ã¯aarch64çRHCOSã§ãã£ã¦ãä»®æ³ãã·ã³ã¨ãã¦èµ·åã§ããªãç¶æ³ãããã¾ã§ç¶ãã¦ãã¾ãã
ãã®å¾ãªãªã¼ã¹ãããaarch64çRHEL 9ã§ã¯ãã¼ã¸ãµã¤ãºã4Kã«å¤æ´ããããããARM Macã§RHEL 9ã®å®è¡ãå¯è½ã«ãªãã¾ãããããã¦ãããããOpenShift 4.13ã®ãªãªã¼ã¹ã¨åããã¦RHEL 9ãã¼ã¹ã®RHCOSï¼å®éã¯9.2ï¼ããªãªã¼ã¹ããããã¨ã«ãªããARM Macã§OpenShiftãåãããããã«ãªã£ãã®ã§ãã
以éã¯OpenShift 4.13ã®RCçã使ã£ã¦ARM Macã«ã·ã³ã°ã«ãã¼ãã®OpenShiftãã¤ã³ã¹ãã¼ã«ããæ¹æ³ããç´¹ä»ãã¾ãã
SNO on ARM Macã®æ§ææ¦è¦
æ§æå³
æ§æã®ç¹å¾´
1å°ã®ARM Macä¸ã§å ¨ã¦å®çµã§ããããã«ä¸è¨ã®ãããªç¹å¾´ãããã¾ãã
- ãã¹ããããã¯ã¼ã¯ä¸ã®éçIPã¢ãã¬ã¹ã使ç¨å¯è½
- ã¤ã³ã¹ãã¼ã«ã«å¿ è¦ãªã¤ã³ãã©è¦ä»¶ã¯DNSãµã¼ãã¼ã®ã¿
- ã¤ã³ã¹ãã¼ã«æã«Bootstrapãã¼ããä¸è¦
- ã³ã³ãããæ´»ç¨ããMacãã¹ãã®è¨å®å¤æ´ãæå°éã«ãã
åææ¡ä»¶
- Macãã¹ãããã¤ã³ã¿ã¼ãããã«ã¢ã¯ã»ã¹ã§ãããã¨
- Proxyçµç±ãéæ¥ç¶ç°å¢ã対å¿å¯è½ã ã¨æãã¾ããåä½ç¢ºèªã¯ãã¦ãã¾ãã
- Macãã¹ãã«ä»®æ³ãã·ã³ãå®è¡ã§ãã空ããªã½ã¼ã¹ããããã¨
- æå°ãªã½ã¼ã¹ï¼8 vCPU, 16GB RAM, Disk 100 GB
- Apple Virtialization Frameworkã«å¯¾å¿ããä»®æ³ç°å¢ã¢ããªãç¨æãããã¨
- UTMãVMware Fusionããªã©
- "Podman Love"
- ã³ã³ããã®å®è¡ã«Podmanã使ãã®ã§Podman Desktopã®å°å ¥ãæ¨å¥¨*1
ä»ã«ã¯ãOpenShiftã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã«å¤å°ã®ç解ããããã¨ãæã¾ããã§ãããæ¬è¨äºã§çç¥ãã¦ããå 容ã¯è£½åããã¥ã¡ã³ãã赤帽ã¨ã³ã¸ãã¢ããã°ã®è¨äºãªã©ãåèã«ãã¦ãã ãã
ãã©ã¡ã¼ã¿ã¼ä¸è¦§
ã¤ã³ã¹ãã¼ã«ã«å¿ è¦ãªãã©ã¡ã¼ã¿ã®ä¸è¦§ã§ãã
ãããã¯ã¼ã¯
é ç® | å 容 | ãµã³ãã«å¤ |
---|---|---|
éçIPã¢ãã¬ã¹1 | Macãã¹ãã®IPã¢ãã¬ã¹ | 192.168.1.150 |
éçIPã¢ãã¬ã¹2 | OpenShiftãã¼ãã®IPã¢ãã¬ã¹ | 192.168.1.40 |
ãããã¯ã¼ã¯ã¢ãã¬ã¹ | CIDR 表è¨ã® IP ãããã¯ã¼ã¯ããã㯠| 192.168.1.0/24 |
ããã©ã«ãã²ã¼ãã¦ã§ã¤ | ãããªãã¯ãããã¯ã¼ã¯ã¸ã®ã²ã¼ãã¦ã§ã¤ | 192.168.1.1 |
ãã¡ã¤ã³ãã¯ã©ã¹ã¿ã¼å
é ç® | å 容 | ãµã³ãã«å¤ |
---|---|---|
ãã¡ã¤ã³ | <base_domain> | home.lab |
ã¯ã©ã¹ã¿ã¼å | <cluster_name> | sno |
å¿ è¦ãªDNSã¬ã³ã¼ã
é ç® | å 容 | ãµã³ãã«å¤ |
---|---|---|
Kubernetes API | api.<cluster_name>. <base_domain> | api.sno.home.lab |
Kubernetes APIï¼å é¨ã¯ã©ã¹ã¿ã¼éä¿¡ï¼ | api-int.<cluster_name>. <base_domain> | api-int.sno.home.lab |
ã¢ããªã±ã¼ã·ã§ã³Ingressãã©ãã£ã㯠| *.apps.<cluster_name>. <base_domain> | *.apps.sno.home.lab |
OpenShiftãã¼ã | <host_name>. <cluster_name>. <base_domain> | m1-ocp.sno.home.lab |
ã¤ã³ã¹ãã¼ã«æ¹æ³
åç §ããã¤ã³ã¹ãã¼ã«ããã¥ã¡ã³ãã¯ä¸è¨ããã¼ã¹ã¨ãã¾ãããæ¬è¨äºã§ã¯ARM Macç¨ã«æ§ã ãªã«ã¹ã¿ãã¤ãºãå ãã¦ãã¾ãã
15.2.2. åä¸ãã¼ãã® OpenShift ãæåã§ã¤ã³ã¹ãã¼ã«ãã
Gitãªãã¸ããªã®ã¯ãã¼ã³
ã¤ã³ã¹ãã¼ã«ã«å¿ è¦ãªãã¡ã¤ã«é¡ã®ãã³ãã¬ã¼ããç¨æãã¦ãã¾ããä¸è¨URLã®ãªãã¸ããªãã¯ãã¼ã³ãã¦ãå©ç¨ãã ããã
GitHub - tnk4on/sno-on-arm-mac: Install Single Node OpenShift on Apple Silicon-based Mac (ARM Mac)
git clone https://github.com/tnk4on/sno-on-arm-mac.git cd sno-on-arm-mac
ã¤ã³ã¹ãã¼ã©ã¼ã¨OpenShift CLIã®å ¥æ
ã¤ã³ã¹ãã¼ã«ã«å¿
è¦ãª openshift-install
ã¨ã¯ã©ã¤ã¢ã³ãã® oc
ãå
¥æãã¦å®è¡ãã¹ã«é
ç½®ãã¾ãã
export OCP_VERSION=4.13.0-rc.2 export ARCH=aarch64 mkdir src cd src curl -LO https://mirror.openshift.com/pub/openshift-v4/$ARCH/clients/ocp/$OCP_VERSION/openshift-install-mac.tar.gz curl -LO https://mirror.openshift.com/pub/openshift-v4/$ARCH/clients/ocp/$OCP_VERSION/openshift-client-mac.tar.gz tar zxf openshift-install-mac.tar.gz tar zxf openshift-client-mac.tar.gz sudo cp openshift-install oc /usr/local/bin/ cd ..
OCP_VERSION
: ã4.13.0-rc.0ã以éãæå®ãã¾ãARCH
: ARM Macã«å¯¾å¿ãããaarch64ããæå®ãã¾ã*2- ãã¦ã³ãã¼ãããã¢ã¼ã«ã¤ãã¯
src
ãã£ã¬ã¯ããªã«ä¸æä¿åãã¾ã - å®è¡ãã¤ããªã®é ç½®å ã¯PATHç°å¢å¤æ°ã§ããã°ã©ãã§ãå¯è½ã§ã
RHCOS ISOã®å ¥æ
ã¤ã³ã¹ãã¼ã«ã«ä½¿ç¨ããRHCOSã®ISOã¤ã¡ã¼ã¸ãå ¥æãã¾ãã
mkdir iso export ISO_URL=$(openshift-install coreos print-stream-json | grep location | grep $ARCH | grep iso | cut -d\" -f4) curl -L $ISO_URL -o iso/rhcos-live.iso
- ãã¦ã³ãã¼ãããISOã¯
iso
ãã£ã¬ã¯ããªã«ä¿åãã¾ããã¤ã³ã¹ãã¼ã«ãç¹°ãè¿ãå ´åã¯ISOã®åå©ç¨ãå¯è½ã§ãã - ISOã®ååã¯ä»»æã§å¤æ´ãã¦ãåé¡ããã¾ãã
DNSãµã¼ãã¼ã®å®è¡
Podmanã使ç¨ãã¦DNSãµã¼ãã¼ãã³ã³ããã§å®è¡ãã¾ããã³ã³ããã¤ã¡ã¼ã¸ã¯OpenShift Localã§ä½¿ç¨ãã¦ãããã®ãå©ç¨ãã¾ãã*3
以éã¯Podman Desktopãå°å ¥å¾ã®ç¶æ ããã®è§£èª¬ã§ããPodman Desktopã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ä¸è¨ãåèã«ãã¦ãã ããã MacOS | Podman Desktop
1. Podman machineãã«ã¼ãã¢ã¼ãã«å¤æ´
Podman machineã§1024çªä»¥ä¸ã®ãã¼ãããã¤ã³ãããããã«ã«ã¼ãã¢ã¼ã(rootful)ã«å¤æ´ãã¾ãã
podman machine stop podman machine set --rootful podman machine start
- Podman machineã®å®è¡åã§ããã°
podman machine init --rootful
ã§åæè¨å®ããæ¹æ³ã§ãå¯
2. Podman machineã®systemd-resolved
ãåæ¢
UDPãã¼ã53çªã使ç¨ã§ããããã«Podman machineã§å®è¡ä¸ã®systemd-resolved
ãåæ¢ãã¾ã
podman machine ssh sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf podman machine ssh systemctl restart systemd-resolved podman machine ssh ss -ltnup
- Podman machineã®å®è¡OSã§ããFedora CoreOSã¯ããã©ã«ãã§
systemd-resolved
ã稼åããããè¨å®å¤æ´ãå¿ è¦ã§ã - Podman machineãåé¤ãã¦åä½æããå ´åã¯å度è¨å®ãå¿ è¦ã§ã
3. dnsmasq.confã®ä¿®æ£
å©ç¨ããç°å¢ã«åããã¦ãã¡ã¤ã³åããã¹ãåãIPã¢ãã¬ã¹ãä¿®æ£ãã¾ãã
dnsmasq.confã®ãµã³ãã«ãå±é
user=root port= 53 expand-hosts log-queries log-facility=- local=/home.lab/ domain=home.lab address=/apps.sno.home.lab/192.168.1.40 address=/api.sno.home.lab/192.168.1.40 address=/api-int.sno.home.lab/192.168.1.40 address=/m1-ocp.sno.home.lab/192.168.1.40 ptr-record=40.1.168.192.in-addr.arpa,m1-ocp.sno.home.lab rev-server=192.168.1.0/24,127.0.0.1
log-queries
ã¨log-facility
ï¼ãããã°ç®çã§æ¨æºåºåã«ã¯ã¨ãªãã°ãåºåãã¾ããä¸è¦ã§ããã°åé¤å¯è½ã§ããptr-record
ï¼OpenShiftãã¼ãã®ã¿éå¼ãè¨å®ãå¿ è¦ã§ãããããç¡ãã¨ã¤ã³ã¹ãã¼ã«ãæ£å¸¸ã«å®äºãã¾ããã*4rev-server
ï¼éå¼ããè¡ãDNSãµã¼ãã¼ã¯èªåèªèº«(127.0.0.1)ãæå®ãã¾ãã
4. ã³ã³ããã®å®è¡
Podmanã使ãDNSãµã¼ãã¼ãã³ã³ããã§å®è¡ãã¾ã
podman run -d --rm -p 53:53/udp -v ./dnsmasq.conf:/etc/dnsmasq.conf --name dnsmasq quay.io/crcont/dnsmasq:latest
- Macä¸ã®
dnsmasq.conf
ããã¤ã³ããã¦ã³ããã¦ã³ã³ããå ã«èªã¿è¾¼ã¿ã¾ã - ï¼æ³¨æï¼Macä¸ã§ã¯
podman system service
ã¯ä½¿ç¨ã§ããªãã®ã§ãã³ã³ãããèªåå®è¡ãããå ´åã¯Podman machineå ã«ä»è¾¼ããªã©ã®å·¥å¤«ãå¿ è¦ã§ã --rm
ãä»ãããã©ããã¯ã好ã¿ã§ã©ãã
Macãã¹ãã®è¨å®å¤æ´
Macãã¹ãèªèº«ããOpenShiftã¯ã©ã¹ã¿ã¼ã¸ã®ã¢ã¯ã»ã¹ã«å¿ è¦ãªDNSåå解決ã®è¨å®ãè¡ãã¾ãã
1. /etc/resolver
ãã©ã¦ã¶ã¼çããOpenShiftã¯ã©ã¹ã¿ã¼ã¸æ¥ç¶ããéã«<cluster_name>. <base_domain>ã®DNSã¯ã¨ãªã¯ã³ã³ããã§å®è¡ä¸ã®DNSãµã¼ãã¼ã¸è»¢éããããã«/etc/resolver
ã使ç¨ãã¾ãã
sudo tee /etc/resolver/sno.home.lab &>/dev/null <<EOF nameserver 127.0.0.1 EOF
2. /etc/hosts
oc
ã¯ã©ã¤ã¢ã³ãã¯/etc/resolver
ãééããDNSåå解決ãè¡ããªããããéçã«/etc/hosts
ã«OpenShiftã¯ã©ã¹ã¿ã¼ã®Kubernetes APIã®DNSã¬ã³ã¼ããç»é²ãã¾ãã
sudo tee -a /etc/hosts &>/dev/null <<EOF 192.168.1.40 api.sno.home.lab EOF
RHCOS ISOã®ãã¹ãèµ·åã¨ããã¤ã¹åã®ç¢ºèª
使ç¨ããä»®æ³ç°å¢ã¢ããªã§OpenShiftãã¼ãç¨ã®ä»®æ³ãã·ã³ãä½æãã¾ãã
[UTMã®å ´åã®è¨å®åèå¤]
é ç® | ãµã³ãã«å¤ |
---|---|
CPU(Cores) | 8 |
Memory(MB) | 16384 |
Storage(GB) | 100 *5 |
Use Apple Virtualization | ãªã³ |
Network Mode | Bridged |
Boot ISO Image | <ä»»æã®ãã¹>/iso/rhcos-live.iso |
- CPUãMemoryã®ãµã³ãã«å¤ã¯æå°ãªã½ã¼ã¹è¦ä»¶ãã
ä»®æ³ãã·ã³ä½æå¾ãISOããèµ·åãã¾ããISOã®èµ·åæé ã¯ä»®æ³ç°å¢ã¢ããªã«æºãã¾ãã
æ£å¸¸ã«RHCOSãLiveã¢ã¼ãã§èµ·åããã¨core
ã¦ã¼ã¶ã¼ã§ãã°ã¤ã³ããç¶æ
ã®ã³ã³ã½ã¼ã«ã表示ããã¾ãã
ãã®å¾ãã¤ã³ã¹ãã¼ã«ã«å¿
è¦ãªã¹ãã¬ã¼ã¸ããã¤ã¹åã¨NICåã確èªãã¾ãã
sudo fdisk -l ip a
ï¼åèï¼
- NIC:
enp0s1
(UTM),ens160
(VMware Fusion)- ã¹ãã¬ã¼ã¸ããã¤ã¹:
/dev/vda
(UTM),/dev/nvme0n1
(VMware Fusion NVMe),/dev/sda
(VMware Fusion SATA)
install-config.yamlã®æ´æ°
ãå©ç¨ã®ç°å¢ã«åããã¦install-config.yaml
ã®å
容ãä¿®æ£ãã¾ãã
install-config.yamlã®ãµã³ãã«ãå±é
apiVersion: v1 baseDomain: home.lab compute: - name: worker replicas: 0 controlPlane: name: master replicas: 1 metadata: name: sno networking: clusterNetworks: - cidr: 10.128.0.0/14 hostPrefix: 23 machineNetwork: - cidr: 192.168.1.0/24 networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 platform: none: {} bootstrapInPlace: installationDisk: /dev/vda pullSecret: '{"auths":...}' sshKey: 'ssh-ed25519 AAAA...'
1. ã¤ã³ã¹ãã¼ã«å ãã£ã¹ã¯
åé
ã§ç¢ºèªããã¹ãã¬ã¼ã¸ããã¤ã¹åã«åããã¦ãinstall-config.yaml
å
ã®installationDisk:
å¤ãä¿®æ£ãã¾ãã
bootstrapInPlace: installationDisk: /dev/vda
2. ãã«ã·ã¼ã¯ã¬ãã
Red Hat Hybrid Cloud Console ããå
¥æãããã«ã·ã¼ã¯ã¬ãããpullSecret:
ã«è²¼ãä»ãã¾ãã
pullSecret: '{"auths":...}'
3. SSHãã¼
äºåã«ä½æããSSHãã¼ãã¢ã®å
¬ééµãsshKey:
ã«è²¼ãä»ãã¾ã
ï¼åèï¼25.1.6. ã¯ã©ã¹ã¿ã¼ãã¼ãã® SSH ã¢ã¯ã»ã¹ç¨ã®ãã¼ãã¢ã®çæ
sshKey: 'ssh-ed25519 AAAA...'
Ignitionãã¡ã¤ã«ã®ä½æ
ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªãä½æããIgnitionãã¡ã¤ã«ãä½æãã¾ãã
mkdir ocp cp install-config.yaml ocp openshift-install --dir=ocp create single-node-ignition-config
- ï¼æ³¨æï¼Ignitionãã¡ã¤ã«ãä½æããã¨ä½¿ç¨ãã
install-config.yaml
ã¯å¤±ãããã®ã§ãæ¯åã³ãã¼ãã¦å ãã¡ã¤ã«ãæ®ãããã«ãã¾ããã
Ignitionãã¡ã¤ã«ã®ä½æå¾ã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªæ§æã¯ä¸è¨ã®ããã«ãªãã¾ã
ocp âââ auth â  âââ kubeadmin-password â  âââ kubeconfig âââ bootstrap-in-place-for-live-iso.ign âââ metadata.json âââ worker.ign
- Bootstrap Inplaceæ¹å¼ã§ã¤ã³ã¹ãã¼ã«ããããã
worker.ign
ã¯ä½¿ç¨ãã¾ãã
Ignitionãã¡ã¤ã«ãRHCOS ISOã¸åãè¾¼ã
RHCOS ISOã«Ignitionãã¡ã¤ã«ãåãè¾¼ãã«ã¯coreos-installerã使ç¨ãã¾ããããããªããMacåãã®coreos-installer
ã³ãã³ãã¯ç¡ããããã³ã³ããã§å®è¡ãã¦ä»£ç¨ãã¾ãã
1. aliasã³ãã³ãã®ç»é²
ã³ã³ããå®è¡ã³ãã³ããaliasã³ãã³ãã¨ãã¦ç»é²ãã¾ã
alias coreos-installer='podman run --privileged --rm \ -v $PWD:/data \ -w /data quay.io/coreos/coreos-installer:release' coreos-installer --version
- ãã¼ã¸ã§ã³ã表示ãããã°OKã§ã
- (åè)15.2.2.1. coreos-installer ã«ããã¤ã³ã¹ãã¼ã« ISO ã®çæ
- ããã¥ã¡ã³ãã®ã³ã³ããå®è¡ã³ãã³ãã¯Linuxåãã§è¨è¼ããã¦ããããMacä¸ã®Podmanã§å®è¡ããå ´åã¯ã¨ã©ã¼ã«ãªãã¾ãããã®ãããã¤ã³ããã¦ã³ããªãã·ã§ã³ãMacåãã«ä¿®æ£ãã¦ãã¾ãã
2. Ignitionãã¡ã¤ã«ã®åãè¾¼ã¿
coreos-installer
ã³ãã³ãã使ããRHCOS ISOã«bootstrap-in-place-for-live-iso.ign
ãã¡ã¤ã«ãåãè¾¼ã¿ã¾ã
coreos-installer iso ignition embed -fi ocp/bootstrap-in-place-for-live-iso.ign iso/rhcos-live.iso
- ã¨ã©ã¼ãªãã³ãã³ããçµäºããã°æåã§ããç¹ã«ãã°åºåãªã©ã¯ããã¾ãããè¦ãç®ã¯ISOãã¡ã¤ã«ã®æ´æ°æ¥æãå¤æ´ããããããã§ãã
OpenShiftãã¼ãã®éçIPã¢ãã¬ã¹è¨å®
RHCOS ISOã¤ã¡ã¼ã¸ã«äºåã«ã«ã¼ãã«å¼æ°ãè¨å®ãããã¨ã§ãRHCOSã©ã¤ãç°å¢ã®èµ·åæã«éçIPã¢ãã¬ã¹ãè¨å®ãã¾ãã
ï¼ä½è«ï¼OpenShiftãã¼ãã«éçIPã¢ãã¬ã¹ãè¨å®ããæ¹æ³ã¯ããã¥ã¡ã³ããKCSã«ãããã¤ãæé ãããã¾ãããä»åã®ã¤ã³ã¹ãã¼ã«æ¹æ³ï¼SNOã®Bootstrap Inplaceã¤ã³ã¹ãã¼ã«ï¼ã§ã¯ä¸è¨ã®çç±ã«ããå¾è¿°ããISOã«ã«ã¼ãã«å¼æ°ãè¨å®ããæ¹æ³ããæ¡ç¨ã§ãã¾ããã
coreos-installer iso ignition embed
ã¨coreos-installer iso customize
ãä½µç¨ã§ããªã- Ignitionãã¡ã¤ã«ãåãè¾¼ãã§ããããèªåã§ã¤ã³ã¹ãã¼ã«ãå§ã¾ã£ã¦ãã¾ãï¼ã©ã¤ãç°å¢èµ·åå¾ã«æåã§ã«ã¼ãã«å¼æ°ã®è¨å®ãã§ããªãï¼
1. ç°å¢å¤æ°ã®è¨å®
ã«ã¼ãã«å¼æ°ã«æå®ããç°å¢å¤æ°ãè¨å®ãã¾ã
export IP=192.168.1.40 export GATEWAY=192.168.1.1 export NETMASK=255.255.255.0 export INT=enp0s1 export HOSTNAME=m1-ocp.sno.home.lab export DNS=192.168.1.150
2. ISOã«ã«ã¼ãã«å¼æ°ãè¨å®ãã
coreos-installer
ã³ãã³ãã使ããISOã«ã«ã¼ãã«å¼æ°ãè¨å®ãã¾ã
coreos-installer iso kargs modify -a "console=ttyS0 rd.neednet=1 ip=${IP}::${GATEWAY}:${NETMASK}:${HOSTNAME}:${INT}:none nameserver=${DNS}" iso/rhcos-live.iso
- (åè:KCS) Single Node OpenShift (SNO) to support static IP configuration during installation - Red Hat Customer Portal
RHCOS ISOã®èµ·å
iso/rhcos-live.iso
ã使ç¨ãã¦ISOãèµ·åãã¾ããISOèµ·åå¾ã¯èªåã§ã¯ã©ã¹ã¿ã¼ã®ã¤ã³ã¹ãã¼ã«ãéå§ããã¾ãã
ã¤ã³ã¹ãã¼ã«ã®èªåå®è¡ä¸ãä¸è¨ã®ã¿ã¤ãã³ã°ã§åèµ·åã2åè¡ããã¾ãã
- 1åç®ï¼ISOèµ·åâãã£ã¹ã¯ã¸æ¸ãè¾¼ã¿å®äºå¾
- 2åç®ï¼Bootstrapéå§âBootstrapå®äºå¾
ï¼ä½è«ï¼4.13.0-rc.0
ã使ç¨ããã¨ãBootstrapããã»ã¹ã«ç§»è¡å¾ã«RHCOSããCentOS Stream CoreOSã¸åãæ¿ããã¾ãã4.13.0-rc.2
以éã¯RHCOSã«å®å
¨ç§»è¡ãã¾ããã
ï¼åèï¼ã¤ã³ã¹ãã¼ã«ç¶æ³ã®ã¢ãã¿ãªã³ã°
OpenShiftã®ã¤ã³ã¹ãã¼ã«å®è¡ä¸ãã¿ã¼ããã«ã¦ã£ã³ãã¦ãè¤æ°éãä¸è¨ã®ã³ãã³ããå©ç¨ãã¦ãã°ã®ã¢ãã¿ãªã³ã°ãã§ãã¾ãã
ã¿ã¼ããã«1: RHCOSãã¼ãä¸ã®ãã°
export IP=192.168.1.40 sed -i -e "/${IP}/d" ~/.ssh/known_hosts ssh core@${IP} -o "StrictHostKeyChecking=no" journalctl -b -f
ã¿ã¼ããã«2ï¼Cluster Operatorã®èµ·åç¶æ³
export KUBECONFIG=ocp/auth/kubeconfig watch -n 1 oc get co
ã¿ã¼ããã«3ï¼ã¤ã³ã¹ãã¼ã«ãã°
export KUBECONFIG=ocp/auth/kubeconfig openshift-install --dir=ocp wait-for bootstrap-complete openshift-install --dir=ocp wait-for install-complete
ã¿ã¼ããã«4: DNSãµã¼ãã¼ã®ãã°
podman logs -f dnsmasq
ç°å¢ã®ãªã»ãã
ã¤ã³ã¹ãã¼ã«ã«åé¡ããã£ãå ´åã¯ä¸è¨ãå®è¡ãã¦ç°å¢ããªã»ãããã¾ãããã®å¾ãIgnitionãã¡ã¤ã«ãRHCOS ISOã¸åãè¾¼ãæé ããåéãã¾ãã
ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªã®åé¤
rm -rf ocp
ISOã¤ã¡ã¼ã¸ã®åæå
coreos-installer iso reset iso/rhcos-live.iso
ã¤ã³ã¹ãã¼ã«å¾ã®ç¶æ³
ã¤ã³ã¹ãã¼ã«ç´å¾ã®ãã£ã¹ã¯ä½¿ç¨éï¼ãã£ã¹ã¯ã¤ã¡ã¼ã¸ã®ãµã¤ãºï¼ã¯ ç´23 GBã§ããã Activity Monitorã§è¦ãCPUãã¡ã¢ãªã®ç¶æ³ã¯ä¸è¨ã®éãã§ãããã¹ãã¯M1 MAX(10ã³ã¢/64GB RAM)ã§ãã
ChromeãVS CodeãPodman DesktopãUTMãªã©ãç«ã¡ä¸ããç¶æ ã§ããç¹ã«OSã®åä½ä¸ã®éããªã©ã¯æãããã¾ããã
One more thing ?
OpenShift 4.13ã®RCçãå ¬éããããã¨ã«ããã誰ã§ãARM Macã«OpenShiftãã¤ã³ã¹ãã¼ã«ãããã¨ãã§ããããã«ãªãã¾ããã*6
ç¾æç¹ã§ã¯ã¤ã³ã¹ãã¼ã«ãã§ããç¶æ ã«è¾¿ãçããã¨ãããªã®ã§ãå®éã®æ§è½é¢ãäºææ§ã¯æªç¥æ°ã§ããã§ãããæ®æ®µä½¿ãã®ARM Macã§å¸¸æåãããOpenShiftç°å¢ãããã¨ããã®ã¯ã¨ã¦ãã¯ã¯ã¯ã¯ãã¾ããM2 MaxãM1 Ultraãªã©ãæè¼ãã端æ«ãªãã©ãã¾ã§ã§ããã®ãï¼ãªã©ã¨èããã®ã楽ãããã®ã§ãã
ããã«ï¼ä»åç´¹ä»ããUPIããã¼ã¹ã¨ããæåã¤ã³ã¹ãã¼ã«æ¹æ³ã®ä»ã«ããã£ã¨ã¤ã³ã¹ãã¼ã«ãç°¡åã«ããæ¹æ³ãããã¾ããæ¯æ´ä»ãã¤ã³ã¹ãã¼ã©ã¼ï¼Assisted Installerï¼ ã¨OCP 4.12ããç»å ´ãã ã¨ã¼ã¸ã§ã³ããã¼ã¹ã®ã¤ã³ã¹ãã¼ã©ã¼ï¼Agent-Based Installerï¼ ã§ããæ®å¿µãªããæ¬è¨äºå·çæç¹ã§ã¯ARM Macã«å¯¾ãã¦ãããã®æ¹æ³ãç¨ããã¤ã³ã¹ãã¼ã«ãã§ãã¾ãããã¤ã³ã¹ãã¼ã«ã®ç¢ºèªãã§ãããã¾ãå¥ã®è¨äºã«ã¦ç´¹ä»ãããã¨æãã¾ãã
ï¼2023/4/3ã追è¨ï¼ ã¨ã¼ã¸ã§ã³ããã¼ã¹ã®ã¤ã³ã¹ãã¼ã«è¨äºãå ¬éãã¾ããï¼ rheb.hatenablog.com
ï¼2023/5/10ã追è¨ï¼ æ¯æ´ä»ãã¤ã³ã¹ãã¼ã©ã¼ã®è¨äºãå ¬éãã¾ããï¼ rheb.hatenablog.com
*1:ä»ã®ã³ã³ããå®è¡ç°å¢ã§ã代æ¿ãã¯å¯è½ã ã¨æãã¾ããããã£ãããªã®ã§Podmanã使ãã¾ãããï¼
*2:ããããã¤ã³ããã®1ããã¤ããªåãåããªã®ã§openshift-install versionãå®è¡ãã¦release architecture:ã®åºåçµæã確èªããããamd64ãªã®ãarm64ãªã®ãå¤å¥ã§ãã¾ããã
*3:OpenShift Localã®ä¸ã§åãã¦ããã³ã³ããã«ã¤ãã¦ã¯ãã®è¨äºã§ç´¹ä»ãã¦ãã¾ã https://rheb.hatenablog.com/entry/crc_remote_connecting
*4:ããããã¤ã³ããã®2ããã®PTRã¬ã³ã¼ããç¡ãã¨Cluster Operatorã®èµ·åçµç¤ã§é²ã¾ãªããªãã¾ãã
*5:100GBã§ãã¤ã³ã¹ãã¼ã«åã®æ¤è¨¼ã«ãã¹ããããã«ãã°ãä¿®æ£ããã¾ãã https://github.com/openshift/installer/pull/7025
*6:éå ¬éã¤ã¡ã¼ã¸ã使ã£ãRed Hatå ¬å¼ããã°ã®è¨äºã¯ããã¾ãããã誰ã§ãã¤ã³ã¹ãã¼ã«ã§ããããã«ãªã£ãã®ã¯4.13 RCçå ¬é以éã§ãã https://cloud.redhat.com/blog/openshift-on-an-apple-m1-vm-with-red-hat-advanced-cluster-management