{"id":2039,"date":"2018-05-12T16:04:04","date_gmt":"2018-05-12T14:04:04","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=2039"},"modified":"2018-05-17T18:03:43","modified_gmt":"2018-05-17T16:03:43","slug":"docker-openshift","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=2039","title":{"rendered":"Docker using with OpenShift"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Install_CentOS\"><span class=\"toc_number toc_depth_1\">1<\/span> Install CentOS<\/a><\/li><li><a href=\"#Install_Docker\"><span class=\"toc_number toc_depth_1\">2<\/span> Install Docker<\/a><\/li><li><a href=\"#Install_OpenShift\"><span class=\"toc_number toc_depth_1\">3<\/span> Install OpenShift<\/a><\/li><li><a href=\"#Start_OpenShift_cluster\"><span class=\"toc_number toc_depth_1\">4<\/span> Start OpenShift cluster<\/a><\/li><li><a href=\"#Example_expose_Jenkins\"><span class=\"toc_number toc_depth_1\">5<\/span> Example expose Jenkins<\/a><\/li><\/ul><\/div>\n<h1><span id=\"Install_CentOS\">Install CentOS<\/span><\/h1>\n<p>Please install a fresh CentOS version : <a href=\"?page_id=103\">CENTOS INSTALLATION<\/a><\/p>\n<h1><span id=\"Install_Docker\">Install Docker<\/span><\/h1>\n<pre lang=\"bash\">yum -y install docker\r\n\r\n# Ensure that the Docker daemon is running with --insecure-registry argument on the Docker daemon\r\nsed -i '\/OPTIONS=.*\/c\\OPTIONS=\"--selinux-enabled --insecure-registry 172.30.0.0\/16\"' \/etc\/sysconfig\/docker\r\n\r\nsystemctl enable docker\r\nsystemctl start docker\r\n<\/pre>\n<h1><span id=\"Install_OpenShift\">Install OpenShift<\/span><\/h1>\n<pre lang=\"bash\">yum -y install centos-release-openshift-origin\r\nyum -y install origin\r\n<\/pre>\n<h1><span id=\"Start_OpenShift_cluster\">Start OpenShift cluster<\/span><\/h1>\n<pre lang=\"bash\">\t \t \r\noc cluster up --public-hostname=MYIPADDR \t \r\n<\/pre>\n<p>and login as administrator<\/p>\n<pre lang=\"bash\">oc login -u system:admin\r\n<\/pre>\n<h1><span id=\"Example_expose_Jenkins\">Example expose Jenkins<\/span><\/h1>\n<pre lang=\"bash\">oc new-project ci\r\noc new-app library\/jenkins:2.0\r\noc expose svc jenkins\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 Install CentOS2 Install Docker3 Install OpenShift4 Start OpenShift cluster5 Example expose Jenkins Install CentOS Please install a fresh CentOS version : CENTOS INSTALLATION Install Docker yum -y install docker # Ensure that the Docker daemon is running with &#8211;insecure-registry argument on the Docker daemon sed -i &#8216;\/OPTIONS=.*\/c\\OPTIONS=&#8221;&#8211;selinux-enabled &#8211;insecure-registry 172.30.0.0\/16&#8243;&#8216; \/etc\/sysconfig\/docker systemctl enable docker systemctl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1857,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2039","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/2039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2039"}],"version-history":[{"count":17,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/2039\/revisions"}],"predecessor-version":[{"id":2056,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/2039\/revisions\/2056"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1857"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}