wiki:linux/openshift

Version 1 (modified by yuna, 7 years ago) (diff)

--

OpenShift?

OpenShift? Originのインストール

# yum install -y epel-release 
(必要であれば)

# yum install -y docker

# curl --location -O  https://github.com/openshift/origin/releases/download/v3.6.0-rc.0/openshift-origin-server-v3.6.0-rc.0-98b3d56-linux-64bit.tar.gz
# tar zxvf openshift-origin-server-v3.6.0-rc.0-98b3d56-linux-64bit.tar.gz
# sudo mv openshift-origin-server-v3.6.0-rc.0-98b3d56-linux-64bit /opt/openshift

# firewall-cmd --permanent --add-port=8443/tcp
(firewalldが動作していれば)

# setenforce 0
# systemctl enable docker

# systemctl stop dnsmasq
# systemctl disable dnsmasq
(dnsmasqが動いていれば)


■下記のファイルの該当箇所を編集

○/etc/sysconfig/docker-storage
STORAGE_DRIVER='-s overlay2'

○/etc/sysconfig/docker
#OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
OPTIONS='--log-driver=journald --signature-verification=false'

○/etc/sysconfig/docker-network
DOCKER_NETWORK_OPTIONS='-dns 8.8.8.8'

○/etc/selinux/config
#SELINUXTYPE=enforcing
SELINUXTYPE=permissiv

■Docker / OpenShift実行
# systemctl restart docker
# cd /opt/openshift
# /opt/openshift/openshift start >& /var/log/openshift-console.log &

設定ファイルのパーミッション修正
# chmod +r "/opt/openshift/openshift.local.config/master/admin.kubeconfig"

■OpenShiftの利用
export KUBECONFIG=/opt/openshift/openshift.local.config/master/admin.kubeconfig
export CURL_CA_BUNDLE=/opt/openshift/openshift.local.config/master/ca.crt
export PATH=/opt/openshift:${PATH}
sudo chmod +r "/opt/openshift/openshift.local.config/master/admin.kubeconfig