By Erin Boyd, Jose Rivera, and Scott Creeley, Red Hat
Did you ever get a new, exciting toy only to have that excitement squashed by the phrase "Batteries not included"?
With the introduction of Red Hat OpenShift Container Platform 3.6, no longer will customers have to wait or jump extra hurdles to get resilient, persistent storage with their new installations. Now they can more easily deploy Red Hat Gluster Storage ready for use by their containerized applications—This is PaaS with batteries included!
With the release of Red Hat OpenShift Container Platform 3.6, users will have the convenience of using a single tool to use Red Hat Gluster Storage as either container-native storage (CNS) or container-ready storage (CRS) alongside the rest of their OpenShift installations. As part of the OpenShift Advanced Installation, users can specify two new storage options: Red Hat Gluster Storage for (1) hosted registry storage or (2) general application storage. To facilitate evaluation of these, an Openshift Container Platform evaluation subscription now includes Red Hat Gluster Storage evaluation binaries and subscriptions.
Following is a sample inventory file that would be used with an OpenShift Container Platform Advanced Installation that deploys two CNS clusters for both hosted registry storage and general application storage.
[OSEv3:children] masters nodes glusterfs_registry glusterfs [OSEv3:vars] ansible_ssh_user=root openshift_master_default_subdomain=cloudapps.example.com openshift_deployment_type=openshift-enterprise openshift_hosted_registry_storage_kind=glusterfs openshift_disable_check=disk_availability,memory_availability [nodes] master1 node=True storage=True master=True openshift_schedulable=False node1 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node2 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node3 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node4 node=True storage=True openshift_schedulable=True node5 node=True storage=True openshift_schedulable=True node6 node=True storage=True openshift_schedulable=True [glusterfs_registry] node1 glusterfs_devices="[ '/dev/xvdc' ]" node2 glusterfs_devices="[ '/dev/xvdc' ]" node3 glusterfs_devices="[ '/dev/xvdc' ]" [glusterfs] node4 glusterfs_devices="[ '/dev/xvdc' ]" node5 glusterfs_devices="[ '/dev/xvdc' ]" node6 glusterfs_devices="[ '/dev/xvdc' ]" [masters] master1 node=True storage=True master=True openshift_schedulable=False
Let's go over the highlighted portions in detail.
The first section defines the host groups the installation will be using. We've defined two new groups: (1) glusterfs_registry and (2) glusterfs. The first specifies a cluster that will host a single volume for use exclusively by a hosted registry. The second specifies a cluster for general application storage and will, by default, come with a Storage Class to enable dynamic provisioning.
[OSEv3:children] masters nodes glusterfs_registry glusterfs
In the following section, we indicate that we want the hosted registry to use Red Hat Gluster Storage for its storage needs.
[OSEv3:vars]
ansible_ssh_user=root
openshift_master_default_subdomain=cloudapps.example.com
openshift_deployment_type=openshift-enterprise
openshift_hosted_registry_storage_kind=glusterfs
openshift_disable_check=disk_availability,memory_availability
In the [nodes] section, we need to specify all nodes in the OpenShift Container Platform cluster. For our installation, we also need to specify which nodes will run pods for the hosted registry. This is done by specifying "openshift_node_labels="{'region': 'infra'}"" for each such node. It is recommended to have at least three nodes running your hosted registry.
[nodes] master1 node=True storage=True master=True openshift_schedulable=False node1 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node2 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node3 node=True storage=True openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True node4 node=True storage=True openshift_schedulable=True node5 node=True storage=True openshift_schedulable=True node6 node=True storage=True openshift_schedulable=True
Now we get to our new sections where we specify the nodes that will be used for storage. CNS and CRS require that each cluster have a minimum of three nodes. Multiple clusters can not share a given node. Because we are deploying two clusters, we need to specify six nodes total. It is also required that each node have at least one dedicated, bare storage device (no data or formatting of any kind) for exclusive use by Red Hat Gluster Storage.
Our first new section is [glusterfs_registry]. Here we specify the nodes of the Red Hat Gluster Storage cluster and the storage devices on those nodes that will be used for a hosted registry's storage. It is not required that these nodes be the same as the ones running the hosted registry.
[glusterfs_registry]
node1 glusterfs_devices="[ '/dev/xvdc' ]"
node2 glusterfs_devices="[ '/dev/xvdc' ]"
node3 glusterfs_devices="[ '/dev/xvdc' ]"
Our second new section, [glusterfs], is used for specifying the Red Hat Gluster Storage cluster and storage devices that will be used for general application storage. These storage devices must also be for exclusive use by Red Hat Gluster Storage. As mentioned, these nodes may not also be part of the cluster used by [glusterfs_registry]. In the case of CNS, it is not required that these nodes be dedicated exclusively to serving storage; CNS pods can coexist with other application pods.
[glusterfs]
node4 glusterfs_devices="[ '/dev/xvdc' ]"
node5 glusterfs_devices="[ '/dev/xvdc' ]"
node6 glusterfs_devices="[ '/dev/xvdc' ]"
Once the installer is complete, the user can see the pre-defined Storage Class by executing:
# oc get storageclasses NAME TYPE glusterfs-storage kubernetes.io/glusterfs
This Storage Class can be used for applications by specifying a Persistent Volume Claim to dynamically provision the required storage volume:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mypvc namespace: glusterfs spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Gi storageClassName: glusterfs-storage
And that's it, your PaaS solution with built-in storage is ready to go! If you want to tune the installation further, more options are available in the Advanced Installation, and a demo video is available here.
저자 소개
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.