OpenStackãæ å½ãã¦ããã½ãªã¥ã¼ã·ã§ã³ã¢ã¼ããã¯ãã®è¼¿æ°´ã§ãã
Public Cloudã§å©ç¨ã§ããRed Hat OpenShift Container Platformï¼ä»¥éOCPï¼ã®ãã³ãºãªã³ãå¼ç¤¾ã®ãã³ãºãªã³ã¯ã¼ã¯ã·ã§ããã«ã¤ãã¦ãç´¹ä»ãã¦ãã¾ããããOCPããPublic Cloudã«ãå±éããã®ã¨åæ§ã«ãPrivate Cloudã§ããRed Hat OpenStack Platformï¼ä»¥éRHOSPï¼ä¸ã«ãããã¤ããOpenshift on OpenStackãããã¾ããèããããã¦ã¼ã¹ã±ã¼ã¹ã¨ãã¦ã¯ãæ¢ã«RHOSPç°å¢ãããã®ã§ããã§OCPã稼åãããããPublic Cloudã§ã¯ãªãPrivate Cloudã§OCPã稼åãããããRHOSPã®ã¤ã³ã¹ã¿ã³ã¹ã¨OCPã®ã³ã³ãããä¸ç·ã«ä½¿ãããã±ã¼ã¹ãªã©ãèãããã¾ãã
OpenStackã¨Openshiftã®é¢ä¿æ§
- RHOSPãã³ã³ãã¥ã¼ããã¹ãã¬ã¼ã¸ããããã¯ã¼ã¯ããã¼ããã©ã³ãµã¼ãæå·åãªã©ã®ãªã½ã¼ã¹ãOCPã«æä¾ãã¾ã
- OCPã¯RHOSPã«ãã£ã¦ãããã¸ã§ãã³ã°ãããã¤ã³ãã©ï¼Red Hat Enterprise Linux CoreOSï¼ä¸ã§ã³ã³ããåãããã¢ããªã±ã¼ã·ã§ã³ãå®è¡ãã¾ã
- OCPã¯ãªã³ããã³ãã§RHOSPã®ãªã½ã¼ã¹ã使ç¨ãã¾ã
é¢ä¿æ§ãå°ãç´°ããè¦ã¦ããã¾ãã
- Compute service
- Red Hat OpenStack Compute (nova)ãOCPã®nodeã¨ãªãä»®æ³ãã·ã³ãå¶å¾¡ãã¾ããã³ã³ããã¯worker nodeã§å®è¡ããã¾ãã
- Object storage
- OpenStackã®defaultã¯Swiftã§ãããRed Hat Ceph Object Gatewayï¼RGWï¼RGWãæ¨å¥¨ãã¾ããOCPã®Internal Registryã«ä½¿ç¨ããã¾ããããã¯ã¨ã³ãã¯Red Hat Ceph Block Storage (RBD)ãå©ç¨ãã¾ãã
- Block storage
- Red Hat OpenStack Block Storage (cinder) ãOCPã®Persistent Storageã«ä½¿ç¨ããã¾ããããã¯ã¨ã³ãã¯Red Hat Ceph Block Storage (RBD)ãå©ç¨ãã¾ãã
- Image storage
- Red Hat OpenStack Image Service (glance) ãOCPã«å¿ è¦ãªRed Hat Enterprise Linux CoreOS (RHCOS)ã¤ã¡ã¼ã¸ãç»é²ããã¾ããã¾ããBootstrap nodeããã³ã¯ã©ã¹ã¿ã¼ã®èµ·åã«ä½¿ç¨ããã OCP Ignition ãã¡ã¤ã«ãä¿åããã¾ããããã¯ã¨ã³ãã¯Red Hat Ceph Block Storage (RBD)ãå©ç¨ãã¾ãã
- Networking service-OpenStack
- Open vSwitch (OVS)
- Networking service - OpenShift
- OpenShift software-defined networking (SDN)
- Ignition
- Red Hat OpenShiftã®ã¤ã³ã¹ãã¼ã«ããã»ã¹ã§ä½¿ç¨ãããRed Hat Enterprise Linux CoreOS (RHCOS) ãã¼ã«
以ä¸ã§ãã¤ã³ã¹ãã¼ã©ã¼ã§ãããã¸ã§ãã³ã°ãããã¤ã³ãã©ã¹ãã©ã¯ãã£ã¼æ¹æ³ã使ç¨ã㦠Red Hat OpenShift Container Platform (OCP) ãã¤ã³ã¹ãã¼ã«ããããã¾ããªã¹ãããã«ã¤ãã¦è¨è¼ãã¾ãããªããRHOSPã¨OCPã®ãã¼ã¸ã§ã³çµã¿åããåã³ã¤ã³ã¹ãã¼ã«æ¹æ³ï¼IPI/UPIï¼ã¯è¤æ°ããããããµãã¼ãç¶æ³ã¯ OpenShift Container Platform on Red Hat OpenStack Platform Support Matrix ã確èªãã¦ãã ããï¼Red Hat Portalã¸ã®ãã°ã¤ã³ãå¿ è¦ã§ãï¼ã
RHOSPã®ã¤ã³ã¹ãã¼ã«
RHOSPã¯RHOSP directorãå©ç¨ãã¦Red Hat Ceph Storageãå«ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã
RHOSPä¸ã§OCPãå©ç¨ããéã®ãããã¯ã¼ã¯ã®æ§ææ¹æ³ã¨ãã¦ãããã©ã«ãã®ãããã¯ã¼ã¯ã³ã³ãã¼ãã³ãã使ç¨ããæ¹æ³ã¨ãPodã¨Serviceã«å¯¾ãã¦ãããã¯ã¼ã¯ãæä¾ããããã«Octaviaã使ç¨ããKuryrã¨ããcontainer network interface (CNI) ãã©ã°ã¤ã³ã使ç¨ããæ¹æ³ãããã¾ããKuryrã¯RHOSPã®ããã³ããããã¯ã¼ã¯ã¨OpenShift SDNã§äºéã®encapsulationããããã¨ãé¿ãããå ´åã«ä½¿ç¨ããã¾ããå ãã¦ãRHOSPã®ã¤ã³ã¹ã¿ã³ã¹ã¨OCPã®Podã®ç¸äºæ¥ç¶ãæä¾ãã¾ãã
OCPã®ã¤ã³ã¹ãã¼ã«
OCPã¯RHOSPã®ããã³ãå ã§å®è¡ãããåããã³ãã®OCPã¯ã©ã¹ã¿ã¼ã¯ä»ã®ããã³ãããåé¢ããã¾ããOCPã®ã¤ã³ã¹ãã¼ã«ã®äºåæºåã¨ãã¦RHOSPã§ä»¥ä¸ã®ä½æ¥ãè¡ã£ã¦ããã¾ãã
- ãããªãã¯ãããã¯ã¼ã¯ã®ä½æ
- OCPã®nodeã«å¿ è¦ãªflavorã®ä½æ
- ã¦ã¼ã¶ã¼ããã³ããã¸ã§ã¯ãï¼ããã³ãï¼ã®ä½æ
- ä¾ãshiftstackãã¨å¼ã°ããããã¸ã§ã¯ã ãä½æããshiftstack_userãã¨ããã¦ã¼ã¶ã¼ãä½æ
- ãªãã¸ã§ã¯ãã¹ãã¬ã¼ã¸ã使ç¨ããããã®ããã³ãã¸ã®ã¢ã¯ã»ã¹ã®ä»ä¸
- ã¦ã¼ã¶ã¼ã®ã¯ã©ã¼ã¿è¨å®
- OCPã¯ã©ã¹ã¿ã¼ã«å¿ è¦ãªãªã½ã¼ã¹è¦ä»¶ãæºãããããã«è¨å®
ä¾ï¼
$ openstack network create public --external --provider-network-type flat --provider-physical-network datacentre
$ openstack subnet create --dhcp --gateway 192.168.122.1 --network public --subnet-range 192.168.122.0/24 --allocation-pool start=192.168.122.151,end=192.168.122.200 public
$ openstack flavor create --ram 16384 --disk 25 --vcpu 4 --public m1.large
$ openstack project create shiftstack
$ openstack user create --password 'redhat' shiftstack_user
$ openstack role add --user shiftstack_user --project shiftstack member
$ openstack role add --user shiftstack_user --project shiftstack Member
$ openstack quota set --cores 28 --ram 120000 shiftstack
ä½æããã¦ã¼ã¶ã¼ï¼ä¾ã§ã¯shiftstack_userï¼ã§directorãã¹ãããOCPãã¤ã³ã¹ãã¼ã«ãã¾ãããã®éRHOSPã®stackã¦ã¼ã¶ã¼ã¨ãã¦æä½ããå¿ è¦ãããã®ã§ãRHOSPã®CLIãå©ç¨ããããã«å¿ è¦ãªRCãã¡ã¤ã«ã¨ãRHOSPã«æ¥ç¶ããããã®è¨å®ãå«ã¾ããcloud.yamlãã¡ã¤ã«ãOpenStackã®ããã·ã¥ãã¼ãããåå¾ãã¾ããRed Hat OpenShift Cluster Manager ãããã¦ã³ãã¼ãããOCP ã¤ã³ã¹ãã¼ã«ããã°ã©ã ãã¯ã©ã¤ã¢ã³ããããã³ãã«ã·ã¼ã¯ã¬ãããå ¥æãã¦ãã¬ã¤ãã«å¾ã£ã¦install-config.yamlãçæãã¾ããã¤ã³ã¹ãã¼ã«ããã°ã©ã ã¯è¤æ°ã®OCPã¯ã©ã¹ã¿ã¼ã管çã§ãããããã¯ã©ã¹ã¿ã¼æ¯ã«ãã£ã¬ã¯ããªãåãã¦ãã¾ããï¼ãã®ä¾ã§ã¯ocpra-configã¨ocpraãå©ç¨ï¼
ä¾ï¼
$ openshift-install --dir=ocpra-config create install-config
? SSH Public Key /home/stack/.ssh/id_rsa.pub
? Platform openstack
? Cloud openstack
? ExternalNetwork public
? APIFloatingIPAddress 192.168.122.152
? FlavorName m1.large
? Base Domain example.com
? Cluster Name ocpra
? Pull Secret [? for help] ******************************************
- SSH Public Keyï¼OCPã®nodeã«ã¢ã¯ã»ã¹ããããã®å ¬ééµã stack ã¦ã¼ã¶ã¼ã®å ¬ééµã使ç¨ãã¾ãã
- Platformï¼RHOCPãã¤ã³ã¹ãã¼ã«ããã¯ã©ã¦ããããã¤ãã¼ãRHOSPã«ã¤ã³ã¹ãã¼ã«ããå ´åã¯ãopenstackããæå®ãã¾ãã
- Cloudï¼ãã³ãã¼ãããclouds.yaml
- ExternalNetwork:ï¼ã --externalãã§å®ç¾©ããããããã¯ã¼ã¯
- APIFloatingIPAddress:ï¼APIã¢ã¯ã»ã¹ã®ããã® Floating IP
- FlavorNameï¼OCPã®nodeã¨ãªãã¤ã³ã¹ã¿ã³ã¹ã®ãã¬ã¼ãã¼
- Base Domainï¼ã¯ã©ã¹ã¿ã¼ã®ãã¼ã¹ãã¡ã¤ã³åã
- Cluster Nameï¼ã¯ã©ã¹ã¿ã¼ã®ååããã®ååã¯ããã¼ã¹ãã¡ã¤ã³åã®æ¥é è¾ã¨ãã¦
. ã¨ãã¦è¿½å ããã¾ãã - Pull Secretï¼ãInstall OpenShift on Red Hat OpenStack Platform with installer-provisioned infrastructureãã®ãPull Secretãã»ã¯ã·ã§ã³ããã³ãã¼ããå¤ã
ä½æãããinstall-config.yamlãå©ç¨ãã¦OCPãã¤ã³ã¹ãã¼ã«ãã¾ãã
$ cp ocpra-config/install-config.yaml ocpra/ $ openshift-install --dir=ocpra create cluster
OCPã¤ã³ã¹ãã¼ã«å¾ã¯ãRHOSPã®ããã·ã¥ãã¼ãã§ãOCPã§ä½¿ç¨ãã¦ããnodeããããã¯ã¼ã¯ã確èªã§ãã¾ãã
æ¢ã«RHOSPç°å¢ã稼åãã¦ããå ´åã¯OCPã®ã¤ã³ã¹ãã¼ã«ããã¥ã¢ã«ãåç §ãã¦ãã ãããRHOSPãå«ãã¦æ§ç¯ããå ´åã¯RHOSPã®ã¤ã³ã¹ãã¼ã«ããã¥ã¢ã«ãå¿ è¦ã§ããã¾ããOCP 4.6ã«ã¯å¯¾å¿ãã¦ããªãã®ã§ãããOCP 4.4ã¨RHOSP 16ãçµã¿åãããå ´åã®ãªãã¡ã¬ã³ã¹ã¢ã¼ããã¯ãã£ã¼ã®æ¥æ¬èªããã¥ã¡ã³ããå ¬éããã¦ããã®ã§ãåèã«ãã¦ãã ããã