openshift MINISHIFT
PASOS>
1./INSTALAMOS ORACLE VM VIRTUAL BOX MANAGER
https://www.virtualbox.org/
2./ BAJAMOS ULTIMA VERSION DE MINISHIFT
UBUNTU 64 Y WINDOWS
EJECUTAMOS LOS SIGUIENTES COMANDOS
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd /
C:\>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64>dir
Volume in drive C has no label.
Volume Serial Number is 66D9-5D66
Directory of C:\minishift-1.34.2-windows-amd64
04/01/2020 08:05 PM <DIR> .
04/01/2020 08:05 PM <DIR> ..
12/12/2019 10:53 PM <DIR> minishift-1.34.2-windows-amd64
0 File(s) 0 bytes
3 Dir(s) 270,653,181,952 bytes free
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.11.0'
53.59 MiB / 53.59 MiB [===================================================================================] 100.00% 0s-- Downloading OpenShift v3.11.0 checksums ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...
Memory: 4 GB
vCPUs : 2
Disk size: 20 GB
Downloading ISO 'https://github.com/minishift/minishift-centos-iso/releases/download/v1.16.0/minishift-centos7.iso'
370.00 MiB / 370.00 MiB [=================================================================================] 100.00% 0s
-- Starting Minishift VM ................................. OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- Writing current configuration for static assignment of IP address ... OK
Importing 'openshift/origin-control-plane:v3.11.0' . CACHE MISS
Importing 'openshift/origin-docker-registry:v3.11.0' . CACHE MISS
Importing 'openshift/origin-haproxy-router:v3.11.0' . CACHE MISS
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Pulling the OpenShift Container Image ......................... OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ..........................................................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0402 02:12:20.727457 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E0402 02:12:22.898780 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0402 02:12:50.841294 2672 config.go:40] Running "create-master-config"
I0402 02:12:54.083444 2672 config.go:46] Running "create-node-config"
I0402 02:12:55.667145 2672 flags.go:30] Running "create-kubelet-flags"
I0402 02:12:56.046450 2672 run_kubelet.go:49] Running "start-kubelet"
I0402 02:12:56.218062 2672 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0402 02:13:56.234809 2672 interface.go:26] Installing "kube-proxy" ...
I0402 02:13:56.234850 2672 interface.go:26] Installing "kube-dns" ...
I0402 02:13:56.234857 2672 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0402 02:13:56.234860 2672 interface.go:26] Installing "openshift-apiserver" ...
I0402 02:13:56.234893 2672 apply_template.go:81] Installing "openshift-apiserver"
I0402 02:13:56.235876 2672 apply_template.go:81] Installing "kube-proxy"
I0402 02:13:56.237023 2672 apply_template.go:81] Installing "kube-dns"
I0402 02:13:56.237218 2672 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0402 02:14:02.150399 2672 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0402 02:17:34.200447 2672 run_self_hosted.go:242] openshift-apiserver available
I0402 02:17:34.201416 2672 interface.go:26] Installing "openshift-controller-manager" ...
I0402 02:17:34.201440 2672 apply_template.go:81] Installing "openshift-controller-manager"
I0402 02:17:38.839328 2672 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0402 02:17:38.879040 2672 interface.go:26] Installing "centos-imagestreams" ...
I0402 02:17:38.879060 2672 interface.go:26] Installing "openshift-image-registry" ...
I0402 02:17:38.879067 2672 interface.go:26] Installing "openshift-router" ...
I0402 02:17:38.879073 2672 interface.go:26] Installing "sample-templates" ...
I0402 02:17:38.879079 2672 interface.go:26] Installing "persistent-volumes" ...
I0402 02:17:38.879089 2672 interface.go:26] Installing "openshift-web-console-operator" ...
I0402 02:17:38.879522 2672 apply_template.go:81] Installing "openshift-web-console-operator"
I0402 02:17:38.879921 2672 apply_list.go:67] Installing "centos-imagestreams"
I0402 02:17:38.886950 2672 interface.go:26] Installing "sample-templates/mariadb" ...
I0402 02:17:38.886973 2672 interface.go:26] Installing "sample-templates/mysql" ...
I0402 02:17:38.886979 2672 interface.go:26] Installing "sample-templates/postgresql" ...
I0402 02:17:38.886984 2672 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0402 02:17:38.886991 2672 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0402 02:17:38.886997 2672 interface.go:26] Installing "sample-templates/mongodb" ...
I0402 02:17:38.887002 2672 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0402 02:17:38.887010 2672 interface.go:26] Installing "sample-templates/django quickstart" ...
I0402 02:17:38.887016 2672 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0402 02:17:38.887021 2672 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0402 02:17:38.887027 2672 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0402 02:17:38.887103 2672 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0402 02:17:38.887856 2672 apply_list.go:67] Installing "sample-templates/mariadb"
I0402 02:17:38.887994 2672 apply_list.go:67] Installing "sample-templates/mysql"
I0402 02:17:38.888098 2672 apply_list.go:67] Installing "sample-templates/postgresql"
I0402 02:17:38.888198 2672 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0402 02:17:38.888303 2672 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0402 02:17:38.888426 2672 apply_list.go:67] Installing "sample-templates/mongodb"
I0402 02:17:38.888546 2672 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0402 02:17:38.888644 2672 apply_list.go:67] Installing "sample-templates/django quickstart"
I0402 02:17:38.888738 2672 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0402 02:17:38.888880 2672 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0402 02:18:02.448499 2672 interface.go:41] Finished installing "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/cakephp quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral"
I0402 02:18:39.361497 2672 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://122.128.99.100:8443/console
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
-- Exporting of OpenShift images is occuring in background process with pid 5664.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
************************************************************************************************************* SE HABILITA DIRECTAMENTE
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl
curl: try 'curl --help' for more information
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
***************************************
yml de configuracion para el build
config.yml
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name:my-build-config
spec:
runPolicy: Serial
source:
git:
ref: master
uri:
type: Git
strategy:
sourceStrategy:
type: Source
output:
to:
kind:
name:
triggers:
- type: ConfigChange
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc login -u developer2 -p developer
Login successful.
You don't have any projects. You can try to create a new project, by running
oc new-project <projectname>
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc whoami
developer2
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc whoami -t
fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
*****************
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd /
C:\>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64>dir
Volume in drive C has no label.
Volume Serial Number is 66D9-5D66
Directory of C:\minishift-1.34.2-windows-amd64
04/01/2020 08:05 PM <DIR> .
04/01/2020 08:05 PM <DIR> ..
12/12/2019 10:53 PM <DIR> minishift-1.34.2-windows-amd64
0 File(s) 0 bytes
3 Dir(s) 270,653,181,952 bytes free
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.11.0'
53.59 MiB / 53.59 MiB [===================================================================================] 100.00% 0s-- Downloading OpenShift v3.11.0 checksums ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...
Memory: 4 GB
vCPUs : 2
Disk size: 20 GB
Downloading ISO 'https://github.com/minishift/minishift-centos-iso/releases/download/v1.16.0/minishift-centos7.iso'
370.00 MiB / 370.00 MiB [=================================================================================] 100.00% 0s
-- Starting Minishift VM ................................. OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- Writing current configuration for static assignment of IP address ... OK
Importing 'openshift/origin-control-plane:v3.11.0' . CACHE MISS
Importing 'openshift/origin-docker-registry:v3.11.0' . CACHE MISS
Importing 'openshift/origin-haproxy-router:v3.11.0' . CACHE MISS
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Pulling the OpenShift Container Image ......................... OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ..........................................................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0402 02:12:20.727457 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E0402 02:12:22.898780 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0402 02:12:50.841294 2672 config.go:40] Running "create-master-config"
I0402 02:12:54.083444 2672 config.go:46] Running "create-node-config"
I0402 02:12:55.667145 2672 flags.go:30] Running "create-kubelet-flags"
I0402 02:12:56.046450 2672 run_kubelet.go:49] Running "start-kubelet"
I0402 02:12:56.218062 2672 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0402 02:13:56.234809 2672 interface.go:26] Installing "kube-proxy" ...
I0402 02:13:56.234850 2672 interface.go:26] Installing "kube-dns" ...
I0402 02:13:56.234857 2672 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0402 02:13:56.234860 2672 interface.go:26] Installing "openshift-apiserver" ...
I0402 02:13:56.234893 2672 apply_template.go:81] Installing "openshift-apiserver"
I0402 02:13:56.235876 2672 apply_template.go:81] Installing "kube-proxy"
I0402 02:13:56.237023 2672 apply_template.go:81] Installing "kube-dns"
I0402 02:13:56.237218 2672 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0402 02:14:02.150399 2672 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0402 02:17:34.200447 2672 run_self_hosted.go:242] openshift-apiserver available
I0402 02:17:34.201416 2672 interface.go:26] Installing "openshift-controller-manager" ...
I0402 02:17:34.201440 2672 apply_template.go:81] Installing "openshift-controller-manager"
I0402 02:17:38.839328 2672 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0402 02:17:38.879040 2672 interface.go:26] Installing "centos-imagestreams" ...
I0402 02:17:38.879060 2672 interface.go:26] Installing "openshift-image-registry" ...
I0402 02:17:38.879067 2672 interface.go:26] Installing "openshift-router" ...
I0402 02:17:38.879073 2672 interface.go:26] Installing "sample-templates" ...
I0402 02:17:38.879079 2672 interface.go:26] Installing "persistent-volumes" ...
I0402 02:17:38.879089 2672 interface.go:26] Installing "openshift-web-console-operator" ...
I0402 02:17:38.879522 2672 apply_template.go:81] Installing "openshift-web-console-operator"
I0402 02:17:38.879921 2672 apply_list.go:67] Installing "centos-imagestreams"
I0402 02:17:38.886950 2672 interface.go:26] Installing "sample-templates/mariadb" ...
I0402 02:17:38.886973 2672 interface.go:26] Installing "sample-templates/mysql" ...
I0402 02:17:38.886979 2672 interface.go:26] Installing "sample-templates/postgresql" ...
I0402 02:17:38.886984 2672 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0402 02:17:38.886991 2672 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0402 02:17:38.886997 2672 interface.go:26] Installing "sample-templates/mongodb" ...
I0402 02:17:38.887002 2672 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0402 02:17:38.887010 2672 interface.go:26] Installing "sample-templates/django quickstart" ...
I0402 02:17:38.887016 2672 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0402 02:17:38.887021 2672 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0402 02:17:38.887027 2672 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0402 02:17:38.887103 2672 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0402 02:17:38.887856 2672 apply_list.go:67] Installing "sample-templates/mariadb"
I0402 02:17:38.887994 2672 apply_list.go:67] Installing "sample-templates/mysql"
I0402 02:17:38.888098 2672 apply_list.go:67] Installing "sample-templates/postgresql"
I0402 02:17:38.888198 2672 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0402 02:17:38.888303 2672 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0402 02:17:38.888426 2672 apply_list.go:67] Installing "sample-templates/mongodb"
I0402 02:17:38.888546 2672 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0402 02:17:38.888644 2672 apply_list.go:67] Installing "sample-templates/django quickstart"
I0402 02:17:38.888738 2672 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0402 02:17:38.888880 2672 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0402 02:18:02.448499 2672 interface.go:41] Finished installing "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/cakephp quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral"
I0402 02:18:39.361497 2672 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.100:8443/console
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
-- Exporting of OpenShift images is occuring in background process with pid 5664.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc
'oc' is not recognized as an internal or external command,
operable program or batch file.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>cd C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>minishift
'minishift' is not recognized as an internal or external command,
operable program or batch file.
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>cd,,
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>cd ..
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift oc-env
SET PATH=C:\Users\RPerez\.minishift\cache\oc\v3.11.0\windows;%PATH%
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('minishift oc-env') DO @call %i
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>SET PATH=C:\Users\RPerez\.minishift\cache\oc\v3.11.0\windows;%PATH%
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc login -u system:admin
Logged into "https://192.168.99.100:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-dns
kube-proxy
kube-public
kube-system
* myproject
openshift
openshift-apiserver
openshift-controller-manager
openshift-core-operators
openshift-infra
openshift-node
openshift-service-cert-signer
openshift-web-console
Using project "myproject".
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl
curl: try 'curl --help' for more information
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects -H "authorization: Bearer fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY"
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"developer2\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects -H "Authorization: Bearer fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY"
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"developer2\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Starting Minishift VM ............................ OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 17% used OK
-- Writing current configuration for static assignment of IP address ... OK
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster .....................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0412 03:58:55.366562 2550 flags.go:30] Running "create-kubelet-flags"
I0412 03:58:56.372267 2550 run_kubelet.go:49] Running "start-kubelet"
I0412 03:58:56.998244 2550 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0412 03:59:25.060573 2550 interface.go:26] Installing "kube-proxy" ...
I0412 03:59:25.061432 2550 interface.go:26] Installing "kube-dns" ...
I0412 03:59:25.061443 2550 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0412 03:59:25.061449 2550 interface.go:26] Installing "openshift-apiserver" ...
I0412 03:59:25.061488 2550 apply_template.go:81] Installing "openshift-apiserver"
I0412 03:59:25.062424 2550 apply_template.go:81] Installing "kube-proxy"
I0412 03:59:25.063576 2550 apply_template.go:81] Installing "kube-dns"
I0412 03:59:25.063924 2550 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0412 04:00:07.308990 2550 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0412 04:00:36.007736 2550 run_self_hosted.go:242] openshift-apiserver available
I0412 04:00:36.007777 2550 interface.go:26] Installing "openshift-controller-manager" ...
I0412 04:00:36.007798 2550 apply_template.go:81] Installing "openshift-controller-manager"
I0412 04:00:39.342277 2550 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0412 04:00:39.359430 2550 interface.go:26] Installing "centos-imagestreams" ...
I0412 04:00:39.359443 2550 interface.go:26] Installing "openshift-image-registry" ...
I0412 04:00:39.359448 2550 interface.go:26] Installing "openshift-router" ...
I0412 04:00:39.359453 2550 interface.go:26] Installing "sample-templates" ...
I0412 04:00:39.359458 2550 interface.go:26] Installing "persistent-volumes" ...
I0412 04:00:39.359464 2550 interface.go:26] Installing "openshift-web-console-operator" ...
I0412 04:00:39.359706 2550 apply_template.go:81] Installing "openshift-web-console-operator"
I0412 04:00:39.359832 2550 apply_list.go:67] Installing "centos-imagestreams"
I0412 04:00:39.360796 2550 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0412 04:00:39.360805 2550 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0412 04:00:39.360810 2550 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0412 04:00:39.360815 2550 interface.go:26] Installing "sample-templates/mongodb" ...
I0412 04:00:39.360820 2550 interface.go:26] Installing "sample-templates/mariadb" ...
I0412 04:00:39.360824 2550 interface.go:26] Installing "sample-templates/postgresql" ...
I0412 04:00:39.360829 2550 interface.go:26] Installing "sample-templates/django quickstart" ...
I0412 04:00:39.360834 2550 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0412 04:00:39.360839 2550 interface.go:26] Installing "sample-templates/mysql" ...
I0412 04:00:39.360890 2550 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0412 04:00:39.360900 2550 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0412 04:00:39.360942 2550 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0412 04:00:39.361505 2550 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0412 04:00:39.361648 2550 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0412 04:00:39.361771 2550 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0412 04:00:39.361946 2550 apply_list.go:67] Installing "sample-templates/mongodb"
I0412 04:00:39.362052 2550 apply_list.go:67] Installing "sample-templates/mariadb"
I0412 04:00:39.362156 2550 apply_list.go:67] Installing "sample-templates/postgresql"
I0412 04:00:39.362249 2550 apply_list.go:67] Installing "sample-templates/django quickstart"
I0412 04:00:39.362366 2550 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0412 04:00:39.362477 2550 apply_list.go:67] Installing "sample-templates/mysql"
I0412 04:00:39.362577 2550 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0412 04:00:56.063085 2550 interface.go:41] Finished installing "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/postgresql" "sample-templates/django quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/mysql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart"
I0412 04:00:56.512689 2550 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.100:8443/console
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
*************************************************************************************************************************************************************************************************************************************************
VERSIONES ANTERIORES A 2018
Crear un servlet para subir archivos al servidor
bash: /Users/robertoperez/.bash_profile: line 4: unexpected EOF while looking for matching `"'
bash: /Users/robertoperez/.bash_profile: line 8: syntax error: unexpected end of file
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Robertos-MacBook-Pro:~ robertoperez$ git clone
https://github.com/docker/getting-started.git
Cloning into 'getting-started'...
remote: Enumerating objects: 246, done.
remote: Counting objects: 100% (246/246), done
remote: Compressing objects: 100% (188/188), done.
Receiving objects: 33% (82/246), 648.00 KiB | Receiving objects: 34% (84/246), 648.00 KiB | Receiving objects: 35% (87/246), 648.00 KiB | Receiving objects: 36% (89/246), 648.00 KiB | Receiving objects: 37% (92/246), 648.00 KiB | Receiving objects: 38% (94/246), 648.00 KiB | Receiving objects: 39% (96/246), 648.00 KiB | Receiving objects: 40% (99/246), 648.00 KiB | Receiving objects: 40% (99/246), 1.50 MiB | 1.Receiving objects: 41% (101/246), 1.50 MiB | 1Receiving objects: 42% (104/246), 1.50 MiB | 1Receiving objects: 43% (106/246), 1.50 MiB | 1Receiving objects: 44% (109/246), 1.50 MiB | 1Receiving objects: 45% (111/246), 1.50 MiB | 1Receiving objects: 46% (114/246), 1.50 MiB | 1Receiving objects: 47% (116/246), 1.50 MiB | 1Receiving objects: 48% (119/246), 1.50 MiB | 1Receiving objects: 49% (121/246), 1.50 MiB | 1Receiving objects: 50% (123/246), 1.50 MiB | 1Receiving objects: 51% (126/246), 1.50 MiB | 1Receiving objects: 52% (128/246), 1.50 MiB | 1Receiving objects: 53% (131/246), 1.50 MiB | 1Receiving objects: 54% (133/246), 1.50 MiB | 1Receiving objects: 55% (136/246), 1.50 MiB | 1Receiving objects: 56% (138/246), 1.50 MiB | 1Receiving objects: 57% (141/246), 1.50 MiB | 1Receiving objects: 58% (143/246), 1.50 MiB | 1Receiving objects: 59% (146/246), 1.50 MiB | 1Receiving objects: 60% (148/246), 1.50 MiB | 1Receiving objects: 61% (151/246), 2.60 MiB | 1Receiving objects: 62% (153/246), 2.60 MiB | 1Receiving objects: 63% (155/246), 2.60 MiB | 1Receiving objects: 64% (158/246), 2.60 MiB | 1Receiving objects: 65% (160/246), 2.60 MiB | 1remote: Total 246 (delta 92), reused 182 (delta 51), pack-reused 0
Receiving objects: 66% (163/246), 2.60 MiB | 1Receiving objects: 67% (165/246), 2.60 MiB | 1Receiving objects: 68% (168/246), 2.60 MiB | 1Receiving objects: 69% (170/246), 2.60 MiB | 1Receiving objects: 70% (173/246), 2.60 MiB | 1Receiving objects: 71% (175/246), 2.60 MiB | 1Receiving objects: 72% (178/246), 2.60 MiB | 1Receiving objects: 73% (180/246), 2.60 MiB | 1Receiving objects: 74% (183/246), 2.60 MiB | 1Receiving objects: 75% (185/246), 2.60 MiB | 1Receiving objects: 76% (187/246), 2.60 MiB | 1Receiving objects: 77% (190/246), 2.60 MiB | 1Receiving objects: 78% (192/246), 2.60 MiB | 1Receiving objects: 79% (195/246), 2.60 MiB | 1Receiving objects: 80% (197/246), 2.60 MiB | 1Receiving objects: 81% (200/246), 2.60 MiB | 1Receiving objects: 82% (202/246), 2.60 MiB | 1Receiving objects: 83% (205/246), 2.60 MiB | 1Receiving objects: 84% (207/246), 2.60 MiB | 1Receiving objects: 85% (210/246), 2.60 MiB | 1Receiving objects: 86% (212/246), 2.60 MiB | 1Receiving objects: 87% (215/246), 2.60 MiB | 1Receiving objects: 88% (217/246), 2.60 MiB | 1Receiving objects: 89% (219/246), 2.60 MiB | 1Receiving objects: 90% (222/246), 2.60 MiB | 1Receiving objects: 91% (224/246), 2.60 MiB | 1Receiving objects: 92% (227/246), 2.60 MiB | 1Receiving objects: 93% (229/246), 2.60 MiB | 1Receiving objects: 94% (232/246), 2.60 MiB | 1Receiving objects: 95% (234/246), 2.60 MiB | 1Receiving objects: 96% (237/246), 2.60 MiB | 1Receiving objects: 97% (239/246), 2.60 MiB | 1Receiving objects: 98% (242/246), 2.60 MiB | 1Receiving objects: 99% (244/246), 2.60 MiB | 1Receiving objects: 100% (246/246), 2.60 MiB | 1Receiving objects: 100% (246/246), 2.84 MiB | 1.82 MiB/s, done.
Resolving deltas: 100% (92/92), done.
Robertos-MacBook-Pro:~ robertoperez$ cd gettin
g-started
Robertos-MacBook-Pro:getting-started robertope
rez$ docker build -t docker101tutorial .
Sending build context to Docker daemon 9.411MB
Step 1/21 : FROM python:alpine AS base
alpine: Pulling from library/python
cbdbe7a5bc2a: Pull complete
26ebcd19a4e3: Pull complete
a29d43ca1bb4: Pull complete
979dbbcf63e0: Pull complete
30beed04940c: Pull complete
Digest: sha256:690f6313439d755b558ebf040560889947dfe0c74dbdb00002dca7460b0281b6
Status: Downloaded newer image for python:alpine
---> f4df7f234e59
Step 2/21 : WORKDIR /app
---> Running in 498a02b7eb69
Removing intermediate container 498a02b7eb69
---> 97716c28ebc4
Step 3/21 : COPY requirements.txt .
---> c6899d7bf4c9
Step 4/21 : RUN pip install -r requirements.txt
---> Running in 3f536424d2d6
Collecting mkdocs==1.0.4
Downloading mkdocs-1.0.4-py2.py3-none-any.whl (1.2 MB)
Collecting mkdocs-material==4.6.3
Downloading mkdocs_material-4.6.3-py2.py3-none-any.whl (723 kB)
Collecting mkdocs-minify-plugin==0.2.3
Downloading mkdocs-minify-plugin-0.2.3.tar.gz (3.0 kB)
Collecting pygments==2.6.1
Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
Collecting pymdown-extensions==7.0
Downloading pymdown_extensions-7.0-py2.py3-none-any.whl (204 kB)
Collecting click>=3.3
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Markdown>=2.3.1
Downloading Markdown-3.2.2-py3-none-any.whl (88 kB)
Collecting livereload>=2.5.1
Downloading livereload-2.6.1-py2.py3-none-any.whl (23 kB)
Collecting tornado>=5.0
Downloading tornado-6.0.4.tar.gz (496 kB)
Collecting PyYAML>=3.10
Downloading PyYAML-5.3.1.tar.gz (269 kB)
Collecting Jinja2>=2.7.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting htmlmin>=0.1.4
Downloading htmlmin-0.1.12.tar.gz (19 kB)
Collecting jsmin>=2.2.2
Downloading jsmin-2.2.2.tar.gz (12 kB)
Collecting six
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Building wheels for collected packages: mkdocs-minify-plugin, tornado, PyYAML, htmlmin, jsmin, MarkupSafe
Building wheel for mkdocs-minify-plugin (setup.py): started
Building wheel for mkdocs-minify-plugin (setup.py): finished with status 'done'
Created wheel for mkdocs-minify-plugin: filename=mkdocs_minify_plugin-0.2.3-py3-none-any.whl size=2995 sha256=6f1e152ec434f095bb072de7097d42926b37a213af8896f337a73700b6777c08
Stored in directory: /root/.cache/pip/wheels/86/bd/78/7c623bc57d31eb3f8fc8480c0924e8f09974175f16bb745f7b
Building wheel for tornado (setup.py): started
Building wheel for tornado (setup.py): finished with status 'done'
Created wheel for tornado: filename=tornado-6.0.4-cp38-cp38-linux_x86_64.whl size=415149 sha256=ee5c864097dce2a15acfc5e335c49653cb12716111ffac890756e78a1ab95cfb
Stored in directory: /root/.cache/pip/wheels/88/79/e5/598ba17e85eccf2626eab62e4ee8452895636cd542650d450d
Building wheel for PyYAML (setup.py): started
Building wheel for PyYAML (setup.py): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=44617 sha256=54a90d71b24e77db1edb917d84739a7415278a0aad3674b0af9ce9da7f945249
Stored in directory: /root/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c
Building wheel for htmlmin (setup.py): started
Building wheel for htmlmin (setup.py): finished with status 'done'
Created wheel for htmlmin: filename=htmlmin-0.1.12-py3-none-any.whl size=27084 sha256=a098192f7573a52f42811244bf98b68c6705248982ca02960868e39af64331b2
Stored in directory: /root/.cache/pip/wheels/23/14/6e/4be5bfeeb027f4939a01764b48edd5996acf574b0913fe5243
Building wheel for jsmin (setup.py): started
Building wheel for jsmin (setup.py): finished with status 'done'
Created wheel for jsmin: filename=jsmin-2.2.2-py3-none-any.whl size=13918 sha256=202523cfefb1622094bde3a38ee62c3c60368c46440ae09559ddc8ba7f30d73d
Stored in directory: /root/.cache/pip/wheels/65/b7/04/fc4b059d177fd88f3ca362ad372a15e364b0c5433121c7b135
Building wheel for MarkupSafe (setup.py): started
Building wheel for MarkupSafe (setup.py): finished with status 'done'
Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-py3-none-any.whl size=12629 sha256=e19447b59724ccd56ebebc0eb6e88857336c0698e326539615f850ea5dd2e7ad
Stored in directory: /root/.cache/pip/wheels/0c/61/d6/4db4f4c28254856e82305fdb1f752ed7f8482e54c384d8cb0e
Successfully built mkdocs-minify-plugin tornado PyYAML htmlmin jsmin MarkupSafe
Installing collected packages: click, Markdown, tornado, six, livereload, PyYAML, MarkupSafe, Jinja2, mkdocs, pymdown-extensions, pygments, mkdocs-material, htmlmin, jsmin, mkdocs-minify-plugin
Successfully installed Jinja2-2.11.2 Markdown-3.2.2 MarkupSafe-1.1.1 PyYAML-5.3.1 click-7.1.2 htmlmin-0.1.12 jsmin-2.2.2 livereload-2.6.1 mkdocs-1.0.4 mkdocs-material-4.6.3 mkdocs-minify-plugin-0.2.3 pygments-2.6.1 pymdown-extensions-7.0 six-1.15.0 tornado-6.0.4
Removing intermediate container 3f536424d2d6
---> e885f91d3880
Step 5/21 : FROM node:12-alpine AS app-base
12-alpine: Pulling from library/node
cbdbe7a5bc2a: Already exists
f2258f794beb: Pull complete
15bb2c1711f4: Pull complete
5c89d818d1fe: Pull complete
Digest: sha256:7a6d3e124142fe56b974d5beccf42180f9e217d509a02801838801fc85a15c35
Status: Downloaded newer image for node:12-alpine
---> bac10e6a703a
Step 6/21 : WORKDIR /app
---> Running in e50c7da03023
Removing intermediate container e50c7da03023
---> e12d3a410dde
Step 7/21 : COPY app/package.json app/yarn.lock ./
---> ffc1a11fc0b0
Step 8/21 : RUN yarn install
---> Running in 6af13b056112
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 15.37s.
Removing intermediate container 6af13b056112
---> 907104ae9929
Step 9/21 : COPY app/spec ./spec
---> 43fcec2b7f70
Step 10/21 : COPY app/src ./src
---> 52195f7477ee
Step 11/21 : RUN yarn test
---> Running in c4d7b49a915a
yarn run v1.22.4
$ jest
PASS spec/routes/addItem.spec.js
PASS spec/routes/updateItem.spec.js
PASS spec/routes/getItems.spec.js
PASS spec/routes/deleteItem.spec.js
PASS spec/persistence/sqlite.spec.js
Test Suites: 5 passed, 5 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 1.553s
Ran all test suites.
Done in 2.14s.
Removing intermediate container c4d7b49a915a
---> eba75558aa81
Step 12/21 : FROM app-base AS app-zip-creator
---> eba75558aa81
Step 13/21 : RUN rm -rf node_modules && apk add zip && zip -r /app.zip /app
---> Running in 7f654b43a89b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/2) Installing unzip (6.0-r6)
(2/2) Installing zip (3.0-r7)
Executing busybox-1.31.1-r9.trigger
OK: 8 MiB in 18 packages
adding: app/ (stored 0%)
adding: app/src/ (stored 0%)
adding: app/src/persistence/ (stored 0%)
adding: app/src/persistence/sqlite.js (deflated 72%)
adding: app/src/persistence/mysql.js (deflated 73%)
adding: app/src/persistence/index.js (deflated 26%)
adding: app/src/static/ (stored 0%)
adding: app/src/static/css/ (stored 0%)
adding: app/src/static/css/font-awesome/ (stored 0%)
adding: app/src/static/css/font-awesome/all.min.css (deflated 78%)
adding: app/src/static/css/font-awesome/fa-solid-900.eot (deflated 48%)
adding: app/src/static/css/font-awesome/fa-brands-400.eot (deflated 32%)
adding: app/src/static/css/font-awesome/fa-brands-400.ttf (deflated 32%)
adding: app/src/static/css/font-awesome/fa-regular-400.eot (deflated 51%)
adding: app/src/static/css/font-awesome/fa-brands-400.svg#fontawesome (deflated 67%)
adding: app/src/static/css/font-awesome/fa-solid-900.ttf (deflated 48%)
adding: app/src/static/css/font-awesome/fa-regular-400.woff2 (stored 0%)
adding: app/src/static/css/font-awesome/fa-solid-900.woff2 (deflated 0%)
adding: app/src/static/css/font-awesome/fa-brands-400.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-solid-900.svg#fontawesome (deflated 73%)
adding: app/src/static/css/font-awesome/fa-solid-900.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-regular-400.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-brands-400.woff2 (deflated 0%)
adding: app/src/static/css/font-awesome/fa-regular-400.ttf (deflated 51%)
adding: app/src/static/css/font-awesome/fa-regular-400.svg#fontawesome (deflated 74%)
adding: app/src/static/css/styles.css (deflated 48%)
adding: app/src/static/css/bootstrap.min.css (deflated 85%)
adding: app/src/static/index.html (deflated 57%)
adding: app/src/static/js/ (stored 0%)
adding: app/src/static/js/babel.min.js (deflated 73%)
adding: app/src/static/js/react-dom.production.min.js (deflated 68%)
adding: app/src/static/js/app.js (deflated 74%)
adding: app/src/static/js/react.production.min.js (deflated 62%)
adding: app/src/static/js/react-bootstrap.js (deflated 80%)
adding: app/src/routes/ (stored 0%)
adding: app/src/routes/getItems.js (deflated 20%)
adding: app/src/routes/addItem.js (deflated 37%)
adding: app/src/routes/deleteItem.js (deflated 16%)
adding: app/src/routes/updateItem.js (deflated 39%)
adding: app/src/index.js (deflated 59%)
adding: app/spec/ (stored 0%)
adding: app/spec/persistence/ (stored 0%)
adding: app/spec/persistence/sqlite.spec.js (deflated 68%)
adding: app/spec/routes/ (stored 0%)
adding: app/spec/routes/addItem.spec.js (deflated 57%)
adding: app/spec/routes/updateItem.spec.js (deflated 61%)
adding: app/spec/routes/getItems.spec.js (deflated 49%)
adding: app/spec/routes/deleteItem.spec.js (deflated 56%)
adding: app/package.json (deflated 49%)
adding: app/yarn.lock (deflated 61%)
Removing intermediate container 7f654b43a89b
---> a09cb2f2a998
Step 14/21 : FROM base AS dev
---> e885f91d3880
Step 15/21 : CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
---> Running in 17eaeff07312
Removing intermediate container 17eaeff07312
---> f62547ad5c7f
Step 16/21 : FROM base AS build
---> e885f91d3880
Step 17/21 : COPY . .
---> e0cf0eff3552
Step 18/21 : RUN mkdocs build
---> Running in 764b9aaee939
INFO - Cleaning site directory
INFO - Building documentation to directory: /app/site
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- index.md
Removing intermediate container 764b9aaee939
---> 3e62b6718ea8
Step 19/21 : FROM nginx:alpine
alpine: Pulling from library/nginx
cbdbe7a5bc2a: Already exists
c554c602ff32: Pull complete
Digest: sha256:763e7f0188e378fef0c761854552c70bbd817555dc4de029681a2e972e25e30e
Status: Downloaded newer image for nginx:alpine
---> 89ec9da68213
Step 20/21 : COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip
---> b3d2ade1eed3
Step 21/21 : COPY --from=build /app/site /usr/share/nginx/html
---> 9c66a343023d
Successfully built 9c66a343023d
Successfully tagged docker101tutorial:latest
Robertos-MacBook-Pro:getting-started robertope
rez$ ls
Dockerfile
LICENSE
README.md
app
build.sh
docker-compose.yml
docs
mkdocs.yml
requirements.txt
yarn.lock
Robertos-MacBook-Pro:getting-started robertope
rez$ docker run -d -p 80:80 --name docker-tuto
rial docker101tutorial
fd07bda4535c0b3bb08e37e1382efb9f28bd706ed7bcd4930693552b608d1b99
Robertos-MacBook-Pro:getting-started robertope
rez$ docker run -d -p 80:80 --name docker-tuto
rial docker101tutorial
docker: Error response from daemon: Conflict. The container name "/docker-tutorial" is already in use by container "fd07bda4535c0b3bb08e37e1382efb9f28bd706ed7bcd4930693552b608d1b99". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Robertos-MacBook-Pro:getting-started robertope
rez$ ls
Dockerfile
LICENSE
README.md
app
build.sh
docker-compose.yml
docs
mkdocs.yml
requirements.txt
yarn.lock
Robertos-MacBook-Pro:getting-started robertope
rez$
*********
/Users/robertoperez/getting-started
Robertos-MacBook-Pro:getting-started robertope
rez$
PASOS>
1./INSTALAMOS ORACLE VM VIRTUAL BOX MANAGER
https://www.virtualbox.org/
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2. See "About VirtualBox" for an introduction.
Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8, Windows 10), DOS/Windows 3.x, Linux (2.4, 2.6, 3.x and 4.x), Solaris and OpenSolaris, OS/2, and OpenBSD.
VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Oracle ensures the product always meets professional quality criteria.
2./ BAJAMOS ULTIMA VERSION DE MINISHIFT
UBUNTU 64 Y WINDOWS
EJECUTAMOS LOS SIGUIENTES COMANDOS
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd /
C:\>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64>dir
Volume in drive C has no label.
Volume Serial Number is 66D9-5D66
Directory of C:\minishift-1.34.2-windows-amd64
04/01/2020 08:05 PM <DIR> .
04/01/2020 08:05 PM <DIR> ..
12/12/2019 10:53 PM <DIR> minishift-1.34.2-windows-amd64
0 File(s) 0 bytes
3 Dir(s) 270,653,181,952 bytes free
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.11.0'
53.59 MiB / 53.59 MiB [===================================================================================] 100.00% 0s-- Downloading OpenShift v3.11.0 checksums ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...
Memory: 4 GB
vCPUs : 2
Disk size: 20 GB
Downloading ISO 'https://github.com/minishift/minishift-centos-iso/releases/download/v1.16.0/minishift-centos7.iso'
370.00 MiB / 370.00 MiB [=================================================================================] 100.00% 0s
-- Starting Minishift VM ................................. OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- Writing current configuration for static assignment of IP address ... OK
Importing 'openshift/origin-control-plane:v3.11.0' . CACHE MISS
Importing 'openshift/origin-docker-registry:v3.11.0' . CACHE MISS
Importing 'openshift/origin-haproxy-router:v3.11.0' . CACHE MISS
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Pulling the OpenShift Container Image ......................... OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ..........................................................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0402 02:12:20.727457 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E0402 02:12:22.898780 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0402 02:12:50.841294 2672 config.go:40] Running "create-master-config"
I0402 02:12:54.083444 2672 config.go:46] Running "create-node-config"
I0402 02:12:55.667145 2672 flags.go:30] Running "create-kubelet-flags"
I0402 02:12:56.046450 2672 run_kubelet.go:49] Running "start-kubelet"
I0402 02:12:56.218062 2672 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0402 02:13:56.234809 2672 interface.go:26] Installing "kube-proxy" ...
I0402 02:13:56.234850 2672 interface.go:26] Installing "kube-dns" ...
I0402 02:13:56.234857 2672 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0402 02:13:56.234860 2672 interface.go:26] Installing "openshift-apiserver" ...
I0402 02:13:56.234893 2672 apply_template.go:81] Installing "openshift-apiserver"
I0402 02:13:56.235876 2672 apply_template.go:81] Installing "kube-proxy"
I0402 02:13:56.237023 2672 apply_template.go:81] Installing "kube-dns"
I0402 02:13:56.237218 2672 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0402 02:14:02.150399 2672 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0402 02:17:34.200447 2672 run_self_hosted.go:242] openshift-apiserver available
I0402 02:17:34.201416 2672 interface.go:26] Installing "openshift-controller-manager" ...
I0402 02:17:34.201440 2672 apply_template.go:81] Installing "openshift-controller-manager"
I0402 02:17:38.839328 2672 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0402 02:17:38.879040 2672 interface.go:26] Installing "centos-imagestreams" ...
I0402 02:17:38.879060 2672 interface.go:26] Installing "openshift-image-registry" ...
I0402 02:17:38.879067 2672 interface.go:26] Installing "openshift-router" ...
I0402 02:17:38.879073 2672 interface.go:26] Installing "sample-templates" ...
I0402 02:17:38.879079 2672 interface.go:26] Installing "persistent-volumes" ...
I0402 02:17:38.879089 2672 interface.go:26] Installing "openshift-web-console-operator" ...
I0402 02:17:38.879522 2672 apply_template.go:81] Installing "openshift-web-console-operator"
I0402 02:17:38.879921 2672 apply_list.go:67] Installing "centos-imagestreams"
I0402 02:17:38.886950 2672 interface.go:26] Installing "sample-templates/mariadb" ...
I0402 02:17:38.886973 2672 interface.go:26] Installing "sample-templates/mysql" ...
I0402 02:17:38.886979 2672 interface.go:26] Installing "sample-templates/postgresql" ...
I0402 02:17:38.886984 2672 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0402 02:17:38.886991 2672 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0402 02:17:38.886997 2672 interface.go:26] Installing "sample-templates/mongodb" ...
I0402 02:17:38.887002 2672 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0402 02:17:38.887010 2672 interface.go:26] Installing "sample-templates/django quickstart" ...
I0402 02:17:38.887016 2672 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0402 02:17:38.887021 2672 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0402 02:17:38.887027 2672 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0402 02:17:38.887103 2672 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0402 02:17:38.887856 2672 apply_list.go:67] Installing "sample-templates/mariadb"
I0402 02:17:38.887994 2672 apply_list.go:67] Installing "sample-templates/mysql"
I0402 02:17:38.888098 2672 apply_list.go:67] Installing "sample-templates/postgresql"
I0402 02:17:38.888198 2672 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0402 02:17:38.888303 2672 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0402 02:17:38.888426 2672 apply_list.go:67] Installing "sample-templates/mongodb"
I0402 02:17:38.888546 2672 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0402 02:17:38.888644 2672 apply_list.go:67] Installing "sample-templates/django quickstart"
I0402 02:17:38.888738 2672 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0402 02:17:38.888880 2672 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0402 02:18:02.448499 2672 interface.go:41] Finished installing "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/cakephp quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral"
I0402 02:18:39.361497 2672 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://122.128.99.100:8443/console
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
-- Exporting of OpenShift images is occuring in background process with pid 5664.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
************************************************************************************************************* SE HABILITA DIRECTAMENTE
curl: try 'curl --help' for more information
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
***************************************
yml de configuracion para el build
config.yml
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name:my-build-config
spec:
runPolicy: Serial
source:
git:
ref: master
uri:
type: Git
strategy:
sourceStrategy:
type: Source
output:
to:
kind:
name:
triggers:
- type: ConfigChange
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc login -u developer2 -p developer
Login successful.
You don't have any projects. You can try to create a new project, by running
oc new-project <projectname>
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc whoami
developer2
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc whoami -t
fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
*****************
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\RPerez>cd /
C:\>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64>dir
Volume in drive C has no label.
Volume Serial Number is 66D9-5D66
Directory of C:\minishift-1.34.2-windows-amd64
04/01/2020 08:05 PM <DIR> .
04/01/2020 08:05 PM <DIR> ..
12/12/2019 10:53 PM <DIR> minishift-1.34.2-windows-amd64
0 File(s) 0 bytes
3 Dir(s) 270,653,181,952 bytes free
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.11.0'
53.59 MiB / 53.59 MiB [===================================================================================] 100.00% 0s-- Downloading OpenShift v3.11.0 checksums ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...
Memory: 4 GB
vCPUs : 2
Disk size: 20 GB
Downloading ISO 'https://github.com/minishift/minishift-centos-iso/releases/download/v1.16.0/minishift-centos7.iso'
370.00 MiB / 370.00 MiB [=================================================================================] 100.00% 0s
-- Starting Minishift VM ................................. OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- Writing current configuration for static assignment of IP address ... OK
Importing 'openshift/origin-control-plane:v3.11.0' . CACHE MISS
Importing 'openshift/origin-docker-registry:v3.11.0' . CACHE MISS
Importing 'openshift/origin-haproxy-router:v3.11.0' . CACHE MISS
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Pulling the OpenShift Container Image ......................... OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ..........................................................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0402 02:12:20.727457 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E0402 02:12:22.898780 2672 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0402 02:12:50.841294 2672 config.go:40] Running "create-master-config"
I0402 02:12:54.083444 2672 config.go:46] Running "create-node-config"
I0402 02:12:55.667145 2672 flags.go:30] Running "create-kubelet-flags"
I0402 02:12:56.046450 2672 run_kubelet.go:49] Running "start-kubelet"
I0402 02:12:56.218062 2672 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0402 02:13:56.234809 2672 interface.go:26] Installing "kube-proxy" ...
I0402 02:13:56.234850 2672 interface.go:26] Installing "kube-dns" ...
I0402 02:13:56.234857 2672 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0402 02:13:56.234860 2672 interface.go:26] Installing "openshift-apiserver" ...
I0402 02:13:56.234893 2672 apply_template.go:81] Installing "openshift-apiserver"
I0402 02:13:56.235876 2672 apply_template.go:81] Installing "kube-proxy"
I0402 02:13:56.237023 2672 apply_template.go:81] Installing "kube-dns"
I0402 02:13:56.237218 2672 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0402 02:14:02.150399 2672 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0402 02:17:34.200447 2672 run_self_hosted.go:242] openshift-apiserver available
I0402 02:17:34.201416 2672 interface.go:26] Installing "openshift-controller-manager" ...
I0402 02:17:34.201440 2672 apply_template.go:81] Installing "openshift-controller-manager"
I0402 02:17:38.839328 2672 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0402 02:17:38.879040 2672 interface.go:26] Installing "centos-imagestreams" ...
I0402 02:17:38.879060 2672 interface.go:26] Installing "openshift-image-registry" ...
I0402 02:17:38.879067 2672 interface.go:26] Installing "openshift-router" ...
I0402 02:17:38.879073 2672 interface.go:26] Installing "sample-templates" ...
I0402 02:17:38.879079 2672 interface.go:26] Installing "persistent-volumes" ...
I0402 02:17:38.879089 2672 interface.go:26] Installing "openshift-web-console-operator" ...
I0402 02:17:38.879522 2672 apply_template.go:81] Installing "openshift-web-console-operator"
I0402 02:17:38.879921 2672 apply_list.go:67] Installing "centos-imagestreams"
I0402 02:17:38.886950 2672 interface.go:26] Installing "sample-templates/mariadb" ...
I0402 02:17:38.886973 2672 interface.go:26] Installing "sample-templates/mysql" ...
I0402 02:17:38.886979 2672 interface.go:26] Installing "sample-templates/postgresql" ...
I0402 02:17:38.886984 2672 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0402 02:17:38.886991 2672 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0402 02:17:38.886997 2672 interface.go:26] Installing "sample-templates/mongodb" ...
I0402 02:17:38.887002 2672 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0402 02:17:38.887010 2672 interface.go:26] Installing "sample-templates/django quickstart" ...
I0402 02:17:38.887016 2672 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0402 02:17:38.887021 2672 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0402 02:17:38.887027 2672 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0402 02:17:38.887103 2672 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0402 02:17:38.887856 2672 apply_list.go:67] Installing "sample-templates/mariadb"
I0402 02:17:38.887994 2672 apply_list.go:67] Installing "sample-templates/mysql"
I0402 02:17:38.888098 2672 apply_list.go:67] Installing "sample-templates/postgresql"
I0402 02:17:38.888198 2672 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0402 02:17:38.888303 2672 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0402 02:17:38.888426 2672 apply_list.go:67] Installing "sample-templates/mongodb"
I0402 02:17:38.888546 2672 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0402 02:17:38.888644 2672 apply_list.go:67] Installing "sample-templates/django quickstart"
I0402 02:17:38.888738 2672 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0402 02:17:38.888880 2672 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0402 02:18:02.448499 2672 interface.go:41] Finished installing "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/cakephp quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral"
I0402 02:18:39.361497 2672 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.100:8443/console
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
-- Exporting of OpenShift images is occuring in background process with pid 5664.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc
'oc' is not recognized as an internal or external command,
operable program or batch file.
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>cd C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>minishift
'minishift' is not recognized as an internal or external command,
operable program or batch file.
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>cd,,
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows
C:\minishift-1.34.2-windows-amd64\openshift-origin-client-tools-v3.11.0-0cbc58b-windows>cd ..
C:\minishift-1.34.2-windows-amd64>cd minishift-1.34.2-windows-amd64
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift oc-env
SET PATH=C:\Users\RPerez\.minishift\cache\oc\v3.11.0\windows;%PATH%
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('minishift oc-env') DO @call %i
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>SET PATH=C:\Users\RPerez\.minishift\cache\oc\v3.11.0\windows;%PATH%
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>oc login -u system:admin
Logged into "https://192.168.99.100:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-dns
kube-proxy
kube-public
kube-system
* myproject
openshift
openshift-apiserver
openshift-controller-manager
openshift-core-operators
openshift-infra
openshift-node
openshift-service-cert-signer
openshift-web-console
Using project "myproject".
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl
curl: try 'curl --help' for more information
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects -H "authorization: Bearer fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY"
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"developer2\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>curl -k https://192.168.99.100:8443/vi/projects -H "Authorization: Bearer fzwiIxxkDkMmtp1d9e69VGhTfFJNWRLu-5G8XFV6UTY"
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"developer2\" cannot get path \"/vi/projects\": no RBAC policy matched",
"reason": "Forbidden",
"details": {
},
"code": 403
}
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>minishift.exe start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Starting Minishift VM ............................ OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 17% used OK
-- Writing current configuration for static assignment of IP address ... OK
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster .....................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host 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.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0412 03:58:55.366562 2550 flags.go:30] Running "create-kubelet-flags"
I0412 03:58:56.372267 2550 run_kubelet.go:49] Running "start-kubelet"
I0412 03:58:56.998244 2550 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0412 03:59:25.060573 2550 interface.go:26] Installing "kube-proxy" ...
I0412 03:59:25.061432 2550 interface.go:26] Installing "kube-dns" ...
I0412 03:59:25.061443 2550 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0412 03:59:25.061449 2550 interface.go:26] Installing "openshift-apiserver" ...
I0412 03:59:25.061488 2550 apply_template.go:81] Installing "openshift-apiserver"
I0412 03:59:25.062424 2550 apply_template.go:81] Installing "kube-proxy"
I0412 03:59:25.063576 2550 apply_template.go:81] Installing "kube-dns"
I0412 03:59:25.063924 2550 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0412 04:00:07.308990 2550 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0412 04:00:36.007736 2550 run_self_hosted.go:242] openshift-apiserver available
I0412 04:00:36.007777 2550 interface.go:26] Installing "openshift-controller-manager" ...
I0412 04:00:36.007798 2550 apply_template.go:81] Installing "openshift-controller-manager"
I0412 04:00:39.342277 2550 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding web-console ...
I0412 04:00:39.359430 2550 interface.go:26] Installing "centos-imagestreams" ...
I0412 04:00:39.359443 2550 interface.go:26] Installing "openshift-image-registry" ...
I0412 04:00:39.359448 2550 interface.go:26] Installing "openshift-router" ...
I0412 04:00:39.359453 2550 interface.go:26] Installing "sample-templates" ...
I0412 04:00:39.359458 2550 interface.go:26] Installing "persistent-volumes" ...
I0412 04:00:39.359464 2550 interface.go:26] Installing "openshift-web-console-operator" ...
I0412 04:00:39.359706 2550 apply_template.go:81] Installing "openshift-web-console-operator"
I0412 04:00:39.359832 2550 apply_list.go:67] Installing "centos-imagestreams"
I0412 04:00:39.360796 2550 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0412 04:00:39.360805 2550 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0412 04:00:39.360810 2550 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0412 04:00:39.360815 2550 interface.go:26] Installing "sample-templates/mongodb" ...
I0412 04:00:39.360820 2550 interface.go:26] Installing "sample-templates/mariadb" ...
I0412 04:00:39.360824 2550 interface.go:26] Installing "sample-templates/postgresql" ...
I0412 04:00:39.360829 2550 interface.go:26] Installing "sample-templates/django quickstart" ...
I0412 04:00:39.360834 2550 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0412 04:00:39.360839 2550 interface.go:26] Installing "sample-templates/mysql" ...
I0412 04:00:39.360890 2550 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0412 04:00:39.360900 2550 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0412 04:00:39.360942 2550 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0412 04:00:39.361505 2550 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0412 04:00:39.361648 2550 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0412 04:00:39.361771 2550 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0412 04:00:39.361946 2550 apply_list.go:67] Installing "sample-templates/mongodb"
I0412 04:00:39.362052 2550 apply_list.go:67] Installing "sample-templates/mariadb"
I0412 04:00:39.362156 2550 apply_list.go:67] Installing "sample-templates/postgresql"
I0412 04:00:39.362249 2550 apply_list.go:67] Installing "sample-templates/django quickstart"
I0412 04:00:39.362366 2550 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0412 04:00:39.362477 2550 apply_list.go:67] Installing "sample-templates/mysql"
I0412 04:00:39.362577 2550 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0412 04:00:56.063085 2550 interface.go:41] Finished installing "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/postgresql" "sample-templates/django quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/mysql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart"
I0412 04:00:56.512689 2550 interface.go:41] Finished installing "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "openshift-web-console-operator"
Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.100:8443/console
C:\minishift-1.34.2-windows-amd64\minishift-1.34.2-windows-amd64>
*************************************************************************************************************************************************************************************************************************************************
VERSIONES ANTERIORES A 2018
Crear un servlet para subir archivos al servidor
Puedes usar esta app, para subir archivos a servidor remoto
sube unos archivos para probar la app
liga util
Multipart Forms and File Uploads with Tomcat 7
There are lot of new features and enhancements available in Tomcat 7, but the top 3 as suggested by Mark Thomas, Release Manager and Committer for Tomcat 7 are: Servlet 3.0 support, memory leak prevention and detection, and improved security.
In this post, you’ll learn how to provide support for file uploads by using a multipart form with Servlet 3.0. Then, we’ll use Tomcat 7’s new alias feature to provide access to our statically-hosted content outside of your WAR file.
Step 1: Sign up for OpenShift Online
If you don’t already have an OpenShift account, head on over to openshift.com and create an account. Red Hat’s OpenShift Online service offers a free application hosting tier, providing each user with three Gears or application containers. At the time of this writing, the combined resources allocated for each user is 1.5 GB of memory and 3 GB of disk space.
Step 2: Install the client tools on your machine
The OpenShift
rhc
(Red Hat Cloud) command-line tools are written in Ruby, and are installable via RubyGems. With OSX 10.6 or later and most Linux distributions, ruby and RubyGems are available by default, so installing the rhc
client tool is a snap:sudo gem install rhc
Step 3 : Configure your development environment
Run
rhc setup
to link your local development environment to your OpenShift Online account, setup your ssh keys, and select your applications namespace. The namespace is a unique name per user which becomes part of your application url. For example, if your namespace is t20
and application name is tomcat7
then url of the application will be http://tomcat7
–t20
.rhcloud.com/. The command is shown below.rhc setup -l openshift_login
Step 4 : Creating Tomcat 7 Application
Now you’ll be able to create a Tomcat 7 application by executing the command shown below. OpenShift provides Apache Tomcat 7 support via JBoss EWS 2.0 cartridge.
rhc app create tomcat7app tomcat-7
This will allocate our gear (or application container), and set up all of the required SELinux policies and cgroup configurations. OpenShift will also setup a private git repository for your project, and clone the repository to your local system. Finally, OpenShift will propagate the DNS to outside world.
Step 4: Writing a File Upload Servlet
The template project created by OpenShift is a very simple web application with some JSP files and
pom.xml
. We will start by deleting the default files generated by OpenShift in src/main/webapps
folder. This includes web.xml
as well, since it’s optional with Servlet 3.0.git rm -rf src/main/webapp/index.html
git rm -rf src/main/webapp/snoop.jsp
git rm -rf src/main/webapp/health.jsp
git rm -rf src/main/webapp/WEB-INF/web.xml
git commit -am "removed template files"
Next, we’ll update
pom.xml
to contain Servlet-3.0 spec API jar, and update Maven war plugin to create a war file even without web.xml
.
Replace the
pom.xml
content with the one shown below. As you can see, javax.servlet-api
is automatically available in your current scope, as provided by Tomcat 7. Another thing to note is the failOnMissingWebXml
configuration parameter in the Maven WAR plugin is set to true
so that the plugin can assemble the WAR file without a web.xml
.<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>tomcat7</groupId> <artifactId>tomcat7</artifactId> <packaging>war</packaging> <version>1.0</version> <name>tomcat7app</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> </dependencies> <profiles> <profile> <id>openshift</id> <build> <finalName>tomcat7</finalName> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <outputDirectory>webapps</outputDirectory> <warName>ROOT</warName> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>
After updating
pom.xml
, we can write our FileUploadServlet.java
. OpenShift provides users with 1GB of persistent storage on our “small” sized gears.
Place the following content in
src/main/java/FileUploadServlet.java
:package com.tomcat7.servlets; import java.io.IOException; import java.io.PrintWriter; import java.util.Collection; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; @WebServlet("/upload") @MultipartConfig(location = "/var/lib/openshift/12592ddfd6824bd88a45a3dd111b2ced/app-root/data") public class FileUploadServlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { getServletContext().getRequestDispatcher("/WEB-INF/form.jsp").forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); Collection<Part> parts = request.getParts(); out.write("<h2> Total parts : " + parts.size() + "</h2>"); for (Part part : parts) { printEachPart(part, out); part.write(getFileName(part)); } } private void printEachPart(Part part, PrintWriter pw) { StringBuffer sb = new StringBuffer(); sb.append("<p>"); sb.append("Name : " + part.getName()); sb.append("<br>"); sb.append("Content Type : " + part.getContentType()); sb.append("<br>"); sb.append("Size : " + part.getSize()); sb.append("<br>"); for (String header : part.getHeaderNames()) { sb.append(header + " : " + part.getHeader(header)); sb.append("<br>"); } sb.append("</p>"); pw.write(sb.toString()); } private String getFileName(Part part) { String partHeader = part.getHeader("content-disposition"); for (String cd : partHeader.split(";")) { if (cd.trim().startsWith("filename")) { return cd.substring(cd.indexOf('=') + 1).trim().replace("\"", ""); } } return null; } }
The
@MultipartConfig
is used to indicate that the servlet expects requests with multipart/form-data
MIME type which is required for file upload.
You can specify directory location where files will be stored using location attribute of
@MultipartConfig
. You’ll need to update this value for your application.
Replace the UUID
12592ddfd6824bd88a45a3dd111b2ced
with UUID of your application. You can get the UUID for your application using the rhc app show
command. @MultipartConfig
allows you to use the request.getParts
API to get the parts of the request. A part is an item received within a multipart/form-data
POST request.
The servlet shown above exposes both the GET and POST method. The GET method is used to render a form to upload the file. Create a
form.jsp
in your application’s src/main/webapp/WEB-INF
directory:<html>
<head></head>
<body>
<p>Servlet 3.0 File Upload</p>
<form action="upload" enctype="multipart/form-data" method="POST">
<input type="file" name="file1"><br>
<input type="Submit" value="Upload File"><br>
</form>
</body>
</html>
To see this in action, commit your changes, and push them to OpenShift:
git add .
git commit -am "Adding support for uploading files with Servet 3.0 and Tomcat 7"
git push
After
git push
successfully completes, open the browser and go to “https://tomcat7-$namespace
.rhcloud.com/upload”, replacing $namespace
with your own application namespace. This will open render a form to upload a file as shown below.
Choose a file to upload and press the “Upload File” button. After the upload is complete you will see some debug output on the screen.
<h2> Total parts : 1</h2><p>Name : file1<br>Content Type : image/gif<br>Size : 39722<br>content-type : image/gif<br>content-disposition : form-data; name="file1"; filename="OpenShift_USB.gif"<br></p>
To make sure that data was uploaded to OpenShift, you can
ssh
into your application gear and check to see if the file has been written:ssh fe457eacb47a4120ba67dxxxxxxxx@tomcat7-t20.rhcloud.com
[tomcat7-t20.rhcloud.com ~]\> cd $OPENSHIFT_DATA_DIR
[tomcat7app-t20.rhcloud.com data]\> ls
OpenShift_USB.gif shekhar_gulati.jpg
Step 5 : Using aliases to access content outside of your WAR file
Your
FileUploadServlet
writes data to your app’s $OPENSHIFT_DATA_DIR
which is outside of the WAR file. Tomcat 7 has introduced a new concept called aliases, which will allow you to provide access to this content. This new attribute in the context element can point to a folder of static resources. OpenShift allows developers to update these tomcat configuration files. Update context.xml
in the .openshift/config
folder. All the Tomcat 7 configuration files exist under this folder.<Context path="/" aliases="/static=/var/lib/openshift/12592ddfd6824bd88a45a3dd111b2ced/app-root/data"> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> --> </Context>
Assuming that the
/var/lib/openshift/12592ddfd6824bd88a45a3dd111b2ced/app-root/data
folder contains an image openshift.png
and the context.xml
file has been configured as shown above. Then you can easily access the image as https://tomcat7-t20.rhcloud.com/static/shekhar_gulati.jpg
Note : Please make sure to update the UUID
12592ddfd6824bd88a45a3dd111b2ced
with your application’s UUID. You can get this information from rhc app show
command.
Finally, commit the code and deploy your updates:
git add .openshift/config/context.xml
git commit -am "Providing access to statically hosted files with a Tomcat 7 alias"
git push
That’s it for this blog. Happy File Uploading !!!
*********************************************
update 06-2020
installing docker on mac
brew install apache-activemq
brew install apache-activemqbrew install apache-activemq
bash: /Users/robertoperez/.bash_profile: line 4: unexpected EOF while looking for matching `"'
bash: /Users/robertoperez/.bash_profile: line 8: syntax error: unexpected end of file
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Robertos-MacBook-Pro:~ robertoperez$ git clone
https://github.com/docker/getting-started.git
Cloning into 'getting-started'...
remote: Enumerating objects: 246, done.
remote: Counting objects: 100% (246/246), done
remote: Compressing objects: 100% (188/188), done.
Receiving objects: 33% (82/246), 648.00 KiB | Receiving objects: 34% (84/246), 648.00 KiB | Receiving objects: 35% (87/246), 648.00 KiB | Receiving objects: 36% (89/246), 648.00 KiB | Receiving objects: 37% (92/246), 648.00 KiB | Receiving objects: 38% (94/246), 648.00 KiB | Receiving objects: 39% (96/246), 648.00 KiB | Receiving objects: 40% (99/246), 648.00 KiB | Receiving objects: 40% (99/246), 1.50 MiB | 1.Receiving objects: 41% (101/246), 1.50 MiB | 1Receiving objects: 42% (104/246), 1.50 MiB | 1Receiving objects: 43% (106/246), 1.50 MiB | 1Receiving objects: 44% (109/246), 1.50 MiB | 1Receiving objects: 45% (111/246), 1.50 MiB | 1Receiving objects: 46% (114/246), 1.50 MiB | 1Receiving objects: 47% (116/246), 1.50 MiB | 1Receiving objects: 48% (119/246), 1.50 MiB | 1Receiving objects: 49% (121/246), 1.50 MiB | 1Receiving objects: 50% (123/246), 1.50 MiB | 1Receiving objects: 51% (126/246), 1.50 MiB | 1Receiving objects: 52% (128/246), 1.50 MiB | 1Receiving objects: 53% (131/246), 1.50 MiB | 1Receiving objects: 54% (133/246), 1.50 MiB | 1Receiving objects: 55% (136/246), 1.50 MiB | 1Receiving objects: 56% (138/246), 1.50 MiB | 1Receiving objects: 57% (141/246), 1.50 MiB | 1Receiving objects: 58% (143/246), 1.50 MiB | 1Receiving objects: 59% (146/246), 1.50 MiB | 1Receiving objects: 60% (148/246), 1.50 MiB | 1Receiving objects: 61% (151/246), 2.60 MiB | 1Receiving objects: 62% (153/246), 2.60 MiB | 1Receiving objects: 63% (155/246), 2.60 MiB | 1Receiving objects: 64% (158/246), 2.60 MiB | 1Receiving objects: 65% (160/246), 2.60 MiB | 1remote: Total 246 (delta 92), reused 182 (delta 51), pack-reused 0
Receiving objects: 66% (163/246), 2.60 MiB | 1Receiving objects: 67% (165/246), 2.60 MiB | 1Receiving objects: 68% (168/246), 2.60 MiB | 1Receiving objects: 69% (170/246), 2.60 MiB | 1Receiving objects: 70% (173/246), 2.60 MiB | 1Receiving objects: 71% (175/246), 2.60 MiB | 1Receiving objects: 72% (178/246), 2.60 MiB | 1Receiving objects: 73% (180/246), 2.60 MiB | 1Receiving objects: 74% (183/246), 2.60 MiB | 1Receiving objects: 75% (185/246), 2.60 MiB | 1Receiving objects: 76% (187/246), 2.60 MiB | 1Receiving objects: 77% (190/246), 2.60 MiB | 1Receiving objects: 78% (192/246), 2.60 MiB | 1Receiving objects: 79% (195/246), 2.60 MiB | 1Receiving objects: 80% (197/246), 2.60 MiB | 1Receiving objects: 81% (200/246), 2.60 MiB | 1Receiving objects: 82% (202/246), 2.60 MiB | 1Receiving objects: 83% (205/246), 2.60 MiB | 1Receiving objects: 84% (207/246), 2.60 MiB | 1Receiving objects: 85% (210/246), 2.60 MiB | 1Receiving objects: 86% (212/246), 2.60 MiB | 1Receiving objects: 87% (215/246), 2.60 MiB | 1Receiving objects: 88% (217/246), 2.60 MiB | 1Receiving objects: 89% (219/246), 2.60 MiB | 1Receiving objects: 90% (222/246), 2.60 MiB | 1Receiving objects: 91% (224/246), 2.60 MiB | 1Receiving objects: 92% (227/246), 2.60 MiB | 1Receiving objects: 93% (229/246), 2.60 MiB | 1Receiving objects: 94% (232/246), 2.60 MiB | 1Receiving objects: 95% (234/246), 2.60 MiB | 1Receiving objects: 96% (237/246), 2.60 MiB | 1Receiving objects: 97% (239/246), 2.60 MiB | 1Receiving objects: 98% (242/246), 2.60 MiB | 1Receiving objects: 99% (244/246), 2.60 MiB | 1Receiving objects: 100% (246/246), 2.60 MiB | 1Receiving objects: 100% (246/246), 2.84 MiB | 1.82 MiB/s, done.
Resolving deltas: 100% (92/92), done.
Robertos-MacBook-Pro:~ robertoperez$ cd gettin
g-started
Robertos-MacBook-Pro:getting-started robertope
rez$ docker build -t docker101tutorial .
Sending build context to Docker daemon 9.411MB
Step 1/21 : FROM python:alpine AS base
alpine: Pulling from library/python
cbdbe7a5bc2a: Pull complete
26ebcd19a4e3: Pull complete
a29d43ca1bb4: Pull complete
979dbbcf63e0: Pull complete
30beed04940c: Pull complete
Digest: sha256:690f6313439d755b558ebf040560889947dfe0c74dbdb00002dca7460b0281b6
Status: Downloaded newer image for python:alpine
---> f4df7f234e59
Step 2/21 : WORKDIR /app
---> Running in 498a02b7eb69
Removing intermediate container 498a02b7eb69
---> 97716c28ebc4
Step 3/21 : COPY requirements.txt .
---> c6899d7bf4c9
Step 4/21 : RUN pip install -r requirements.txt
---> Running in 3f536424d2d6
Collecting mkdocs==1.0.4
Downloading mkdocs-1.0.4-py2.py3-none-any.whl (1.2 MB)
Collecting mkdocs-material==4.6.3
Downloading mkdocs_material-4.6.3-py2.py3-none-any.whl (723 kB)
Collecting mkdocs-minify-plugin==0.2.3
Downloading mkdocs-minify-plugin-0.2.3.tar.gz (3.0 kB)
Collecting pygments==2.6.1
Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
Collecting pymdown-extensions==7.0
Downloading pymdown_extensions-7.0-py2.py3-none-any.whl (204 kB)
Collecting click>=3.3
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Markdown>=2.3.1
Downloading Markdown-3.2.2-py3-none-any.whl (88 kB)
Collecting livereload>=2.5.1
Downloading livereload-2.6.1-py2.py3-none-any.whl (23 kB)
Collecting tornado>=5.0
Downloading tornado-6.0.4.tar.gz (496 kB)
Collecting PyYAML>=3.10
Downloading PyYAML-5.3.1.tar.gz (269 kB)
Collecting Jinja2>=2.7.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting htmlmin>=0.1.4
Downloading htmlmin-0.1.12.tar.gz (19 kB)
Collecting jsmin>=2.2.2
Downloading jsmin-2.2.2.tar.gz (12 kB)
Collecting six
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Building wheels for collected packages: mkdocs-minify-plugin, tornado, PyYAML, htmlmin, jsmin, MarkupSafe
Building wheel for mkdocs-minify-plugin (setup.py): started
Building wheel for mkdocs-minify-plugin (setup.py): finished with status 'done'
Created wheel for mkdocs-minify-plugin: filename=mkdocs_minify_plugin-0.2.3-py3-none-any.whl size=2995 sha256=6f1e152ec434f095bb072de7097d42926b37a213af8896f337a73700b6777c08
Stored in directory: /root/.cache/pip/wheels/86/bd/78/7c623bc57d31eb3f8fc8480c0924e8f09974175f16bb745f7b
Building wheel for tornado (setup.py): started
Building wheel for tornado (setup.py): finished with status 'done'
Created wheel for tornado: filename=tornado-6.0.4-cp38-cp38-linux_x86_64.whl size=415149 sha256=ee5c864097dce2a15acfc5e335c49653cb12716111ffac890756e78a1ab95cfb
Stored in directory: /root/.cache/pip/wheels/88/79/e5/598ba17e85eccf2626eab62e4ee8452895636cd542650d450d
Building wheel for PyYAML (setup.py): started
Building wheel for PyYAML (setup.py): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=44617 sha256=54a90d71b24e77db1edb917d84739a7415278a0aad3674b0af9ce9da7f945249
Stored in directory: /root/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c
Building wheel for htmlmin (setup.py): started
Building wheel for htmlmin (setup.py): finished with status 'done'
Created wheel for htmlmin: filename=htmlmin-0.1.12-py3-none-any.whl size=27084 sha256=a098192f7573a52f42811244bf98b68c6705248982ca02960868e39af64331b2
Stored in directory: /root/.cache/pip/wheels/23/14/6e/4be5bfeeb027f4939a01764b48edd5996acf574b0913fe5243
Building wheel for jsmin (setup.py): started
Building wheel for jsmin (setup.py): finished with status 'done'
Created wheel for jsmin: filename=jsmin-2.2.2-py3-none-any.whl size=13918 sha256=202523cfefb1622094bde3a38ee62c3c60368c46440ae09559ddc8ba7f30d73d
Stored in directory: /root/.cache/pip/wheels/65/b7/04/fc4b059d177fd88f3ca362ad372a15e364b0c5433121c7b135
Building wheel for MarkupSafe (setup.py): started
Building wheel for MarkupSafe (setup.py): finished with status 'done'
Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-py3-none-any.whl size=12629 sha256=e19447b59724ccd56ebebc0eb6e88857336c0698e326539615f850ea5dd2e7ad
Stored in directory: /root/.cache/pip/wheels/0c/61/d6/4db4f4c28254856e82305fdb1f752ed7f8482e54c384d8cb0e
Successfully built mkdocs-minify-plugin tornado PyYAML htmlmin jsmin MarkupSafe
Installing collected packages: click, Markdown, tornado, six, livereload, PyYAML, MarkupSafe, Jinja2, mkdocs, pymdown-extensions, pygments, mkdocs-material, htmlmin, jsmin, mkdocs-minify-plugin
Successfully installed Jinja2-2.11.2 Markdown-3.2.2 MarkupSafe-1.1.1 PyYAML-5.3.1 click-7.1.2 htmlmin-0.1.12 jsmin-2.2.2 livereload-2.6.1 mkdocs-1.0.4 mkdocs-material-4.6.3 mkdocs-minify-plugin-0.2.3 pygments-2.6.1 pymdown-extensions-7.0 six-1.15.0 tornado-6.0.4
Removing intermediate container 3f536424d2d6
---> e885f91d3880
Step 5/21 : FROM node:12-alpine AS app-base
12-alpine: Pulling from library/node
cbdbe7a5bc2a: Already exists
f2258f794beb: Pull complete
15bb2c1711f4: Pull complete
5c89d818d1fe: Pull complete
Digest: sha256:7a6d3e124142fe56b974d5beccf42180f9e217d509a02801838801fc85a15c35
Status: Downloaded newer image for node:12-alpine
---> bac10e6a703a
Step 6/21 : WORKDIR /app
---> Running in e50c7da03023
Removing intermediate container e50c7da03023
---> e12d3a410dde
Step 7/21 : COPY app/package.json app/yarn.lock ./
---> ffc1a11fc0b0
Step 8/21 : RUN yarn install
---> Running in 6af13b056112
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 15.37s.
Removing intermediate container 6af13b056112
---> 907104ae9929
Step 9/21 : COPY app/spec ./spec
---> 43fcec2b7f70
Step 10/21 : COPY app/src ./src
---> 52195f7477ee
Step 11/21 : RUN yarn test
---> Running in c4d7b49a915a
yarn run v1.22.4
$ jest
PASS spec/routes/addItem.spec.js
PASS spec/routes/updateItem.spec.js
PASS spec/routes/getItems.spec.js
PASS spec/routes/deleteItem.spec.js
PASS spec/persistence/sqlite.spec.js
Test Suites: 5 passed, 5 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 1.553s
Ran all test suites.
Done in 2.14s.
Removing intermediate container c4d7b49a915a
---> eba75558aa81
Step 12/21 : FROM app-base AS app-zip-creator
---> eba75558aa81
Step 13/21 : RUN rm -rf node_modules && apk add zip && zip -r /app.zip /app
---> Running in 7f654b43a89b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/2) Installing unzip (6.0-r6)
(2/2) Installing zip (3.0-r7)
Executing busybox-1.31.1-r9.trigger
OK: 8 MiB in 18 packages
adding: app/ (stored 0%)
adding: app/src/ (stored 0%)
adding: app/src/persistence/ (stored 0%)
adding: app/src/persistence/sqlite.js (deflated 72%)
adding: app/src/persistence/mysql.js (deflated 73%)
adding: app/src/persistence/index.js (deflated 26%)
adding: app/src/static/ (stored 0%)
adding: app/src/static/css/ (stored 0%)
adding: app/src/static/css/font-awesome/ (stored 0%)
adding: app/src/static/css/font-awesome/all.min.css (deflated 78%)
adding: app/src/static/css/font-awesome/fa-solid-900.eot (deflated 48%)
adding: app/src/static/css/font-awesome/fa-brands-400.eot (deflated 32%)
adding: app/src/static/css/font-awesome/fa-brands-400.ttf (deflated 32%)
adding: app/src/static/css/font-awesome/fa-regular-400.eot (deflated 51%)
adding: app/src/static/css/font-awesome/fa-brands-400.svg#fontawesome (deflated 67%)
adding: app/src/static/css/font-awesome/fa-solid-900.ttf (deflated 48%)
adding: app/src/static/css/font-awesome/fa-regular-400.woff2 (stored 0%)
adding: app/src/static/css/font-awesome/fa-solid-900.woff2 (deflated 0%)
adding: app/src/static/css/font-awesome/fa-brands-400.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-solid-900.svg#fontawesome (deflated 73%)
adding: app/src/static/css/font-awesome/fa-solid-900.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-regular-400.woff (deflated 0%)
adding: app/src/static/css/font-awesome/fa-brands-400.woff2 (deflated 0%)
adding: app/src/static/css/font-awesome/fa-regular-400.ttf (deflated 51%)
adding: app/src/static/css/font-awesome/fa-regular-400.svg#fontawesome (deflated 74%)
adding: app/src/static/css/styles.css (deflated 48%)
adding: app/src/static/css/bootstrap.min.css (deflated 85%)
adding: app/src/static/index.html (deflated 57%)
adding: app/src/static/js/ (stored 0%)
adding: app/src/static/js/babel.min.js (deflated 73%)
adding: app/src/static/js/react-dom.production.min.js (deflated 68%)
adding: app/src/static/js/app.js (deflated 74%)
adding: app/src/static/js/react.production.min.js (deflated 62%)
adding: app/src/static/js/react-bootstrap.js (deflated 80%)
adding: app/src/routes/ (stored 0%)
adding: app/src/routes/getItems.js (deflated 20%)
adding: app/src/routes/addItem.js (deflated 37%)
adding: app/src/routes/deleteItem.js (deflated 16%)
adding: app/src/routes/updateItem.js (deflated 39%)
adding: app/src/index.js (deflated 59%)
adding: app/spec/ (stored 0%)
adding: app/spec/persistence/ (stored 0%)
adding: app/spec/persistence/sqlite.spec.js (deflated 68%)
adding: app/spec/routes/ (stored 0%)
adding: app/spec/routes/addItem.spec.js (deflated 57%)
adding: app/spec/routes/updateItem.spec.js (deflated 61%)
adding: app/spec/routes/getItems.spec.js (deflated 49%)
adding: app/spec/routes/deleteItem.spec.js (deflated 56%)
adding: app/package.json (deflated 49%)
adding: app/yarn.lock (deflated 61%)
Removing intermediate container 7f654b43a89b
---> a09cb2f2a998
Step 14/21 : FROM base AS dev
---> e885f91d3880
Step 15/21 : CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
---> Running in 17eaeff07312
Removing intermediate container 17eaeff07312
---> f62547ad5c7f
Step 16/21 : FROM base AS build
---> e885f91d3880
Step 17/21 : COPY . .
---> e0cf0eff3552
Step 18/21 : RUN mkdocs build
---> Running in 764b9aaee939
INFO - Cleaning site directory
INFO - Building documentation to directory: /app/site
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- index.md
Removing intermediate container 764b9aaee939
---> 3e62b6718ea8
Step 19/21 : FROM nginx:alpine
alpine: Pulling from library/nginx
cbdbe7a5bc2a: Already exists
c554c602ff32: Pull complete
Digest: sha256:763e7f0188e378fef0c761854552c70bbd817555dc4de029681a2e972e25e30e
Status: Downloaded newer image for nginx:alpine
---> 89ec9da68213
Step 20/21 : COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip
---> b3d2ade1eed3
Step 21/21 : COPY --from=build /app/site /usr/share/nginx/html
---> 9c66a343023d
Successfully built 9c66a343023d
Successfully tagged docker101tutorial:latest
Robertos-MacBook-Pro:getting-started robertope
rez$ ls
Dockerfile
LICENSE
README.md
app
build.sh
docker-compose.yml
docs
mkdocs.yml
requirements.txt
yarn.lock
Robertos-MacBook-Pro:getting-started robertope
rez$ docker run -d -p 80:80 --name docker-tuto
rial docker101tutorial
fd07bda4535c0b3bb08e37e1382efb9f28bd706ed7bcd4930693552b608d1b99
Robertos-MacBook-Pro:getting-started robertope
rez$ docker run -d -p 80:80 --name docker-tuto
rial docker101tutorial
docker: Error response from daemon: Conflict. The container name "/docker-tutorial" is already in use by container "fd07bda4535c0b3bb08e37e1382efb9f28bd706ed7bcd4930693552b608d1b99". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Robertos-MacBook-Pro:getting-started robertope
rez$ ls
Dockerfile
LICENSE
README.md
app
build.sh
docker-compose.yml
docs
mkdocs.yml
requirements.txt
yarn.lock
Robertos-MacBook-Pro:getting-started robertope
rez$
*********
/Users/robertoperez/getting-started
Robertos-MacBook-Pro:getting-started robertope
rez$
Great Blog! Thanks for sharing this valuable information.
ResponderEliminarDocker and Kubernetes Training
Docker and Kubernetes Online Training
Kubernetes Online Training
Docker Online Training
Docker Training in Hyderabad
Kubernetes Training in Hyderabad
kubernetes online training hyderabad
docker and kubernetes training in ameerpet
Great Blog! Thanks for sharing this valuable information.
ResponderEliminarDocker and Kubernetes Training
Docker and Kubernetes Online Training
Kubernetes Online Training
Docker Online Training
Docker Training in Hyderabad
Kubernetes Training in Hyderabad
kubernetes online training hyderabad
docker and kubernetes training in ameerpet