redhattraining / do288-apps Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The Nexus3 container's Dockerfile in section 8.4 downloads the shell script for its install from following url:
RUN yum install -y --disableplugin=subscription-manager hostname procps \ && curl -L https://www.chef.io/chef/install.sh | bash -s -- -v 14.12.9 \ <-----(*) See Here! && /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \ && chef-solo \ --recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \ --json-attributes /var/chef/solo.json \
But, it is no longer exists and has been moved to another location. This causes the podman build to fail.
# curl -i https://www.chef.io/chef/install.sh HTTP/1.1 301 Moved Permanently : /* In my lab environment */ [student@workstation nexus3]$ podman build -t nexus3 . : /bin/sh: /opt/chef/embedded/bin/erb: No such file or directory Error: error building at STEP "RUN yum install -y โฆ (snip)
As described in the following document, it needs to download from another url.
https://docs.chef.io/chef_install_script/
curl -L https://omnitruck.chef.io/install.sh | sudo bash
The lab notes for Lab 8 - Lab: Building Cloud-Native Applications for OpenShift are incorrect. . The Lab states;
A tododb service exists in your OpenShift project that connects to an external database. To obtain the FQDN of the external database, replace apps in your OpenShift cluster wildcard domain with mysql. For example, if the wildcard domain of your cluster is apps.cluster.domain.example.com, then the database FQDN is mysql.cluster.domain.example.com.
Thus taking my own lab as an example the mysql server would be at the url;
$ set | grep WILDCARD
RHT_OCP4_WILDCARD_DOMAIN=apps.eu46.prod.nextcle.com
$ MYSQL_DB=mysql.eu46.prod.nextcle.com
However this host then fails in the following mysql command
$ mysql -u -p -h${MYSQL_DB}
In the Solution element of the lab we see the command
MYSQL_DB=$(echo
mysql.ocp-${RHT_OCP4_WILDCARD_DOMAIN#"apps."})
Which adds a .ocp- element to the url. Once this is added the mysql command works. So the lab guide is in correct and should suggest to add msql.ocp-{your WILDCARD cluster domain (minus the apps )}
Problem solved. Mistake by me. Sorry.
kill.sh contents:
#!/bin/bash
source /usr/local/etc/ocp4.config
APP_URL=probes-${RHT_OCP4_DEV_USER}-probes.${RHT_OCP4_WILDCARD_DOMAN}
curl http://$APP_URL/flip?op=kill
But apps.js contents:
// This route handles switching the state of the app
route.route('/flip').get(function (req, res) {
var flag = req.query.op;
if (flag === 'kill-health') {
console.log('Received kill request for health probe.');
healthy = false;
res.send('Switched app state to unhealthy...\n');
} else if (flag === "awaken-health") {
console.log('Received awaken request for health probe.');
healthy = true;
res.send('Switched app state to healthy...\n');
} else if (flag === 'kill-ready') {
console.log('Received kill request for readiness probe.');
ready = false;
res.send('Switched app state to not ready...\n');
} else if (flag === 'awaken-ready') {
console.log('Received awaken request for readiness probe.');
ready = true;
res.send('Switched app state to ready...\n');
} else {
res.send('Error! unknown flag...\n');
}
});
there is no value for op=kill
I don't have any insight on why there are both 'master' and 'main' branches in the repository, but it's incredibly confusing in the CLI when muscle memory kicks in which lead to errors in some exercises because the master branch is behind main. So please either drop or rename the master branch so that git complains if the "wrong" default is selected with checkout/switch.
In section 9.2 comprehensive review, it don't specify the name of the backend pod.
Instead, use the "BACKEND_HOST" environment variable to determine where to connect the todo-frontend pod.
Lab document says:
Set the environment variable BACKEND_HOST on the front end deployment to the service name of the todo-backend API.
However, it seems that this environment variable is not actually used. The nginx config file sets its connection to todo-list:3000.
[student@workstation ~]$ cd ~/DO288-apps/todo-frontend [student@workstation todo-frontend]$ grep proxy nginx.conf proxy_pass http://todo-list:3000;
This means that this lab training will fail if the name of the backend pod is not "todo-list" .
I think nginx.conf should use the appropriate environment variable, or add the steps to edit the Containerfile using actual backend pod name.
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.