środa, października 10, 2018

Keycloak i Spring Boot






piątek, października 05, 2018

CentOS 7.5 i OpenShift

[root@vger ~]# cat /etc/hosts | grep -v vger
[root@vger ~]# nslookup vger
Server:  10.0.100.11
Address: 10.0.100.11#53

Name: vger.dc1
Address: 10.0.100.9

[root@vger ~]# hostname
vger.dc1
[root@vger ~]# cat /etc/docker/daemon.json 
{
  "insecure-registries" : ["172.30.0.0/16"]
}
[root@vger ~]# cat /etc/sysconfig/docker-storage
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper "

[root@vger ~]# oc cluster up --public-hostname=vger.dc1 --routing-suffix=vger.dc1
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.10 is available ...
Checking type of volume mount ...
Determining server IP ...
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.10 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.10 ...
I1005 21:51:11.942799    5710 flags.go:30] Running "create-kubelet-flags"
I1005 21:51:22.454887    5710 run_kubelet.go:48] Running "start-kubelet"
I1005 21:51:27.032852    5710 run_self_hosted.go:172] Waiting for the kube-apiserver to be ready ...
I1005 21:52:22.045049    5710 interface.go:26] Installing "kube-proxy" ...
I1005 21:52:22.045121    5710 interface.go:26] Installing "kube-dns" ...
I1005 21:52:22.045154    5710 interface.go:26] Installing "openshift-apiserver" ...
I1005 21:52:22.045285    5710 apply_template.go:83] Installing "openshift-apiserver"
I1005 21:52:22.045307    5710 apply_template.go:83] Installing "kube-proxy"
I1005 21:52:22.045311    5710 apply_template.go:83] Installing "kube-dns"
I1005 21:54:12.417444    5710 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-apiserver"
I1005 21:54:54.701497    5710 run_self_hosted.go:224] openshift-apiserver available
I1005 21:54:54.701602    5710 interface.go:26] Installing "openshift-controller-manager" ...
I1005 21:54:54.701675    5710 apply_template.go:83] Installing "openshift-controller-manager"
I1005 21:55:10.621027    5710 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
Adding registry ...
Adding centos-imagestreams ...
Adding router ...
I1005 21:55:10.661454    5710 interface.go:26] Installing "sample-templates" ...
I1005 21:55:10.661498    5710 interface.go:26] Installing "persistent-volumes" ...
I1005 21:55:10.661516    5710 interface.go:26] Installing "openshift-web-console-operator" ...
I1005 21:55:10.661538    5710 interface.go:26] Installing "openshift-image-registry" ...
I1005 21:55:10.661554    5710 interface.go:26] Installing "centos-imagestreams" ...
I1005 21:55:10.661570    5710 interface.go:26] Installing "openshift-router" ...
I1005 21:55:10.662026    5710 apply_list.go:68] Installing "centos-imagestreams"
I1005 21:55:10.662337    5710 interface.go:26] Installing "sample-templates/postgresql" ...
I1005 21:55:10.662360    5710 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I1005 21:55:10.662378    5710 interface.go:26] Installing "sample-templates/django quickstart" ...
I1005 21:55:10.662395    5710 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I1005 21:55:10.662412    5710 interface.go:26] Installing "sample-templates/rails quickstart" ...
I1005 21:55:10.662430    5710 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I1005 21:55:10.662448    5710 interface.go:26] Installing "sample-templates/sample pipeline" ...
I1005 21:55:10.662463    5710 interface.go:26] Installing "sample-templates/mongodb" ...
I1005 21:55:10.662480    5710 interface.go:26] Installing "sample-templates/mariadb" ...
I1005 21:55:10.662495    5710 interface.go:26] Installing "sample-templates/mysql" ...
I1005 21:55:10.662510    5710 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I1005 21:55:10.662589    5710 apply_list.go:68] Installing "sample-templates/cakephp quickstart"
I1005 21:55:10.663004    5710 apply_list.go:68] Installing "sample-templates/postgresql"
I1005 21:55:10.663305    5710 apply_list.go:68] Installing "sample-templates/dancer quickstart"
I1005 21:55:10.663425    5710 apply_template.go:83] Installing "openshift-web-console-operator"
I1005 21:55:10.663593    5710 apply_list.go:68] Installing "sample-templates/django quickstart"
I1005 21:55:10.664252    5710 apply_list.go:68] Installing "sample-templates/nodejs quickstart"
I1005 21:55:10.664465    5710 apply_list.go:68] Installing "sample-templates/rails quickstart"
I1005 21:55:10.665384    5710 apply_list.go:68] Installing "sample-templates/mongodb"
I1005 21:55:10.666120    5710 apply_list.go:68] Installing "sample-templates/jenkins pipeline ephemeral"
I1005 21:55:10.666799    5710 apply_list.go:68] Installing "sample-templates/sample pipeline"
I1005 21:55:10.667865    5710 apply_list.go:68] Installing "sample-templates/mariadb"
I1005 21:55:10.668691    5710 apply_list.go:68] Installing "sample-templates/mysql"
I1005 21:57:27.162468    5710 interface.go:41] Finished installing "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/cakephp quickstart"
I1005 21:57:27.162561    5710 interface.go:41] Finished installing "sample-templates" "persistent-volumes" "openshift-web-console-operator" "openshift-image-registry" "centos-imagestreams" "openshift-router"
Server Information ...
OpenShift server started.

The server is accessible via web console at:
    https://vger.dc1:8443

[root@vger ~]# firewall-cmd --zone=public --permanent --add-port=8443/tcp

Trzeba mieć poprawnie skonfigurowane DNSy!