| 1 | = OpenShift |
| 2 | |
| 3 | == OpenShift Originのインストール |
| 4 | |
| 5 | {{{ |
| 6 | # yum install -y epel-release |
| 7 | (必要であれば) |
| 8 | |
| 9 | # yum install -y docker |
| 10 | |
| 11 | # 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 |
| 12 | # tar zxvf openshift-origin-server-v3.6.0-rc.0-98b3d56-linux-64bit.tar.gz |
| 13 | # sudo mv openshift-origin-server-v3.6.0-rc.0-98b3d56-linux-64bit /opt/openshift |
| 14 | |
| 15 | # firewall-cmd --permanent --add-port=8443/tcp |
| 16 | (firewalldが動作していれば) |
| 17 | |
| 18 | # setenforce 0 |
| 19 | # systemctl enable docker |
| 20 | |
| 21 | # systemctl stop dnsmasq |
| 22 | # systemctl disable dnsmasq |
| 23 | (dnsmasqが動いていれば) |
| 24 | |
| 25 | |
| 26 | ■下記のファイルの該当箇所を編集 |
| 27 | |
| 28 | ○/etc/sysconfig/docker-storage |
| 29 | STORAGE_DRIVER='-s overlay2' |
| 30 | |
| 31 | ○/etc/sysconfig/docker |
| 32 | #OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false' |
| 33 | OPTIONS='--log-driver=journald --signature-verification=false' |
| 34 | |
| 35 | ○/etc/sysconfig/docker-network |
| 36 | DOCKER_NETWORK_OPTIONS='-dns 8.8.8.8' |
| 37 | |
| 38 | ○/etc/selinux/config |
| 39 | #SELINUXTYPE=enforcing |
| 40 | SELINUXTYPE=permissiv |
| 41 | |
| 42 | ■Docker / OpenShift実行 |
| 43 | # systemctl restart docker |
| 44 | # cd /opt/openshift |
| 45 | # /opt/openshift/openshift start >& /var/log/openshift-console.log & |
| 46 | |
| 47 | 設定ファイルのパーミッション修正 |
| 48 | # chmod +r "/opt/openshift/openshift.local.config/master/admin.kubeconfig" |
| 49 | |
| 50 | ■OpenShiftの利用 |
| 51 | export KUBECONFIG=/opt/openshift/openshift.local.config/master/admin.kubeconfig |
| 52 | export CURL_CA_BUNDLE=/opt/openshift/openshift.local.config/master/ca.crt |
| 53 | export PATH=/opt/openshift:${PATH} |
| 54 | sudo chmod +r "/opt/openshift/openshift.local.config/master/admin.kubeconfig |
| 55 | }}} |