openshiftdemos / containerizing-apps-2021 Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
In some cases the bracket from the prompt gets passed which locks the terminal
Working in the last section of the lab. Got an error msg regarding fail to connect to DB.
[lab-user@studentvm 0 ~]$ oc get pods
NAME READY STATUS RESTARTS AGE
mariadb 1/1 Running 0 6m28s
wordpress 1/1 Running 0 6m28s
[lab-user@studentvm 0 ~]$ oc get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
mariadb ClusterIP 172.30.132.250 3306/TCP 6m2s
wordpress ClusterIP 172.30.182.153 8080/TCP 6m2s
[lab-user@studentvm 0 ~]$ !c
curl -L http://wordpress-user-mcheung-redhat-com.apps.summit2021.openshift.open.redhat.c
om
I did not get any error msg from the log:
[lab-user@studentvm 1 ~]$ oc logs -f wordpress
++ dirname /scripts/start.sh
and the DB seems to be listening (oc logs -f
021-09-27 19:34:43 0 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.3.28-MariaDB' socket: '/tmp/mysql.sock' port: 0 MariaDB Server
---> 19:34:44 MySQL started successfully
I am working on the lab3 to push the image locally to Openshift. It looks like the project is not set, not even to the default.
[lab-user@studentvm 0 ~]$ oc project
No project has been set. Pass a project name to make that the default.
So I got an error when I executed the following command
[lab-user@studentvm 0 ~]$ sudo podman tag localhost/wordpress
ordpress
error: no project has been set
Error: error adding 'default-route-openshift-image-registry.apps.summit2021.openshift.open.re
dhat.com//wordpress' to image "localhost/wordpress": invalid reference format
There's a potential issue if a user accidentally pulls an image from dockerhub and ends up with a localhost
image and another registry image. This was observed in some cases with the mariadb
container image.
Fully qualifying all of the podman run
commands with the localhost
-based tag will fix the issue even if the user has the extra image present.
I tried to create a pod following the instructions in lab, but got weird error. Here are the details:
[lab-user@studentvm 0 ~/workspace/mariadb/openshift]$ ls -l
total 4
-rw-r--r--. 1 lab-user users 392 Sep 24 18:49 mariadb-pod.yaml
[lab-user@studentvm 0 ~/workspace/mariadb/openshift]$ id
uid=1001(lab-user) gid=100(users) groups=100(users),10(wheel) context=unconfined_u:uncon
fined_r:unconfined_t:s0-s0:c0.c1023
[lab-user@studentvm 0 ~/workspace/mariadb/openshift]$ oc create -f mariadb-pod.yaml
error: unable to recognize "mariadb-pod.yaml": Unauthorized
[lab-user@studentvm 1 ~/workspace/mariadb/openshift]$
The file is there and it seems to have the right privilege, but I got the error:
error: unable to recognize "mariadb-pod.yaml": Unauthorized
From the prompt, it looks like it switch between vms? It changed from [lab-user@studentvm 0] to [lab-user@studentvm 1]?
oc whoami --show-console
will get them the URL and then they can login
Current location: Check Your Project
"Under the covers, this cluster has an Operator that will automatically create a default project for your user after you first login. This is not instantaneous, so, before continuing, make sure that the default project exists. Execute the following:"
Needed location: OpenShift Projects and Namespaces
Issue: The tagging op under Tag Images for Registry assumes that the project is created and set. If the user logins in to ocp AND tags the Wordpress image fast enough, the tagging will fail.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.