Giter Club home page Giter Club logo

guide-kubernetes-intro's People

Contributors

ahmad-ayyoub avatar andrewdes avatar austinseto avatar bsbyrd1 avatar davidwyao avatar evelinec avatar gkwan-ibm avatar guidesbot avatar irobins avatar jakub-pomykala avatar justineechen avatar kubik42 avatar maihameed avatar nimg98 avatar proubatsis avatar siwany avatar t27gupta avatar tt-le avatar yeekangc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

guide-kubernetes-intro's Issues

Correct java code

  • NameEndpointTest
    • remove import java.security.KeyManagementException;
  • PingEndpointTest
    • remove import java.security.KeyManagementException;
  • no line should longer than 80~88 characters

Cloud-hosted - unable to access the services directly

Unable to access the services directly, like following output

theia@theiadocker-gkwan:/home/project$ kubectl get services
NAME                TYPE       CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
inventory-service   NodePort   172.21.156.42    <none>        9080:32000/TCP   26s
system-service      NodePort   172.21.164.253   <none>        9080:31000/TCP   26s
theia@theiadocker-gkwan:/home/project$ curl http://172.21.164.253:31000/system/properties
curl: (7) Failed to connect to 172.21.164.253 port 31000: Connection timed out

The test script isn't working on MacOS

Setting environment variables from .travis.yml
$ export CHANGE_MINIKUBE_NONE_USER=true
$ java -Xmx32m -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
$ javac -J-Xmx32m -version
javac 10.0.1
before_script.1
0.01s$ unset _JAVA_OPTIONS
before_script.2
0.04s$ cd finish
0.05s$ sudo mount --make-rshared /
mount: illegal option -- -
usage: mount [-dfruvw] [-o options] [-t external_type] special node
mount [-adfruvw] [-t external_type]
mount [-dfruvw] special | node
The command "sudo mount --make-rshared /" failed and exited with 1 during .

Content review

Abstract:

  • I think the "kubectl" command isn't needed. If you really think it's needed, it needs to be backticked?

What you'll learn

  • The two microservices you will deploy are called name and ping and are provided for you in the start directory. => I think it's not necessary to point to the start directory in this intro section.

  • It feels like explanation is needed for "Pods" and "Ingress controller" as of what they are. Looks like "Pod" is explained in the later section.

What is Kubernetes?

  • Can be helpful to include a link to read more about "Ingress".

Others:

  • The link in this step has an extra \ on the test site: kubernetes-helm, a package manager for Kubernetes called Helm. For installation instructions, see https://docs.helm.sh/using_helm/\#installing-helm.

  • ...check out the Docker guide,.. => perhaps want to use the docker guide title here.

  • ...then check the Maven build log for any potential errors and make sure that your Docker CLI is configured to use Minikube’s Docker daemon and not your host’s as described in [Starting and preparing your cluster for Deployment]. => the link to the Starting and preparing your cluster for Deployment section is enclosed within the []. Is the [] really needed?

  • Then, for the the ping microservice: => get rid off the second "the"

  • If you need to use additional parameters or if you would like more information on the existing parameters, visit the official IBM chart GitHub repository. => I think "IBM chart GitHub repository" is to be read together, right? ie, the link to be applied to them together, instead of just the "GitHub repository". In general, to make this clearer, ie, perhaps "visit the official IBM Helm Chart in the GitHub repository"? I also think the link should be added to "IBM Helm Chart" as in "visit the official IBM Helm Chart in the GitHub repository".

  • Running the install a chart release commands gave error: Error: Chart incompatible with Tiller v2.10.0-rc.1.

  • Both of these chart releases will create three Kubernetes resources each: a Deployment for managing Pods, a Service for defining how Pods are accessed, and an Ingress for defining how external traffic is routed to the Service.
    => it'd be helpful to include the names of the Deployment, Service and Ingress that were created from the chart releases. This will help following the long lines of commands better too.

  • To obtain the IP address of your Minikube cluster, run the minikube ip command, the IP address will be 192.168.99.100 by default. => backtick the 192.168.99.100?

  • See the official Open Liberty Helm chart GitHub repository for more information on this parameter. => here you refer to the same repository again but with different name.

  • Installing a new chart release is done using the same the same helm install command as before. => "the same" is written twice

  • VirtualBox is required when running minikube on Mac

  • Working on Mac, when running the helm install command, there's a pop to accept the incoming network connections as a security and privacy preference. Not sure whether this should be noted.

  • Use of bold words in the guide. Can leave for ID to comment on it.

  • Different styles in inserting commands and outputs, ie, unix and windows commands together in one box; command and output in one box; command only and output only.

  • Duration of guide (without optional section) seems long

Feedback

I could not get minikube running on Windows, so I completed the guide on my Ubuntu VM. Once I made it through the setup portion of the guide, I actually had a pleasant experience. For the most part each command executed smoothly and had a suitable amount of documentation to provide myself with an adequate knowledge of the concepts to continue moving forward.
Here are a few suggestions that I believe would have improved my experience:

  1. I would consider changing the last sentence of the second paragraph in the "What You'll Learn" section where you begin mentioning pods. Even though this is only quickly mentioned, I think people would maybe still need a background on pods to understand your statement. To fix that, I think you could just put the "What is Kubernetes?" section first as I do not believe that would be a bad starting point either.
  2. The setup is obviously a tedious process with minikube so if there are better resources to quickly get through this process I would try my best to include them. The quickest way I was able to have a working version of minikube was by followig the commands in Navid's Kubernetes' lab for Ubuntu. Here is the link (https://apps.na.collabserv.com/wikis/home?lang=en-us#!/wiki/Wfe97e7c353a2_4510_8471_7148220c0bec/page/Kubernetes%20Education)
  3. If the minikube commands on windows require extra flags they should be provided for the user instead of having them hunt them down themselves.
  4. When running mvn verify for the tests I originally had some failures and errors. I was uncertain why, but eventually they worked. Maybe just review this section to ensure everything is okay because I am pretty sure I never introduced a bug into the code.
  5. Excluding the setup and including the optional section I think completing the guide did take over 30 minutes so I would review that and make sure it is accurate.

SME review feedback on 9/27's draft

Just went through the Kubernetes guide. Excellent guide to get started with Kubernetes! I like the fact that the key terms and concepts of Kubernetes are explained well without overwhelming new users.

Minor suggestions:

  1. Perhaps the following sentences could be reworded (sorry, not a fan of words 'whatever' and 'thing')

"Finally, the container port containerPort is whatever the port that your container exposes for purposes of accessing your application. For the services the main thing key point to understand is that"

  1. Some users may misinterpret the following statement about NodePort differently - that it's accessible within the cluster only. It may be worth to clarify/mention that the services would be accessible even from outside the cluster on Node’s IP at the specified port.

"You will also notice that the service has a type of NodePort. This means that you will be able to access these services in your cluster via a specific port."

Improve the instruction for scaling

e.g. kubectl get pods, will see

NAME                               READY     STATUS    RESTARTS   AGE
name-deployment-6bd97d9bf6-bg87p   1/1       Running   0          25m
name-deployment-6bd97d9bf6-jf9rs   1/1       Running   0          25s
name-deployment-6bd97d9bf6-x4zth   1/1       Running   0          25s
ping-deployment-645767664f-pm4bd   1/1       Running   0          25m

ID critique overview edits

General notes:

  • Introductory phrases/clauses should be set off by commas.
  • If a sentence has a subject and a verb/a complete clause on either side of the conjunction, the conjunction requires a comma after it. Example: "Stacy bought and used a laptop throughout college." (no comma) but "Stacy bought a laptop for college, but she uses a desktop at home." (comma included)
  • Try to avoid parenthesis and quotation marks unless they are part of the code itself.
    removed all instances of parenthesis and quotations marks that were unecessary
  • Avoid first person pronouns like "our" and "we."
    removed all instances of "our", there were no instances of "we"
  • Avoid using "this" as a standalone noun. Specify what "this" is, such as "this microservice."
  • Use "want" instead of "wish."
    replaced one instance of "wish" with "want"
  • Unless the acronym is very common, such as URL, spell it out in the first instance where it is used. For example, say "GitHub Enterprise (GHE)" the first time. Subsequent instances can then just be the acronym by itself, "GHE."
  • An apostrophe plus "s" doesn't just indicate possessives but can also be a contraction for a word plus "is." For example, "that's" equals "that is."
  • Use "once" to indicate "one time." Words like "when" or "after" can be substitutes for "once" if you don't intend to mean "one time."
    replaced all such instances of "once" with "when"
  • Try to avoid "should." I understand that the possibility always exists that something might not work. However, it's OK to say a statement that sounds more definitive, such as, "After you do x, the server runs." instead of, "After you do x, the server should run."
  • Avoid "etc." and use "and so on" instead.
  • Keep to the present tense. I notice future tense creeps in here and there in this guide. It's OK to use future tense a little bit, but aim to make over 90% of the sentences present tense.
  • Oftentimes it's good to remove adverbs, such as "really" and other descriptive "-ly" words. I understand that these words can contribute to a more casual tone, but even in fiction writing, adverbs are discouraged because a stronger noun or verb is preferable. Example: Using the word "famished" is preferable to saying "very hungry."
    By descriptive "-ly" words, do you mean ones like "really", "very", "extremely", etc. or all "-ly" words like "automatically", "manually"?
  • If "as" can be interchanged with "because," I think "because" is a little more clear.
    changes all "as" instances to a mix of "because" and "since"
  • Make sure it's clear what a pronoun refers to.
  • A couple of headings indicate "Alternative." It would be nice if we could connect the alternative step to what it's an alternative to in a way that's more clear.
    I'm definitely going to rework the guide a little bit and remove those "alternative" sections
  • On a related note, this guide felt long, and I felt myself losing track of how everything connected. What if we omitted some parts? Sure, you might be able to do certain things more than one way, but do we really need to tell the user the different options to get started? Sometimes when I'm building something, I like to just follow the steps to put it together and not have to choose different options. :)
    Yes... it is quite long, I can probably omit all the alternate routes and just have the users follow through the steps strictly. Some of the optional stuff can probably be moved to a more advanced topic on kubernetes
  • Check out the IBM word usage list to learn about how certain words or phrases should be spelled, such as whether "set up" should have a hyphen or not: https://apps.na.collabserv.com/wikis/home?lang=en-us#!/wiki/W580a84a67242_4da6_81cf_69e3db4bdbfa/page/Word%20usage This list is a good resource that you might want to bookmark. :)
    doesn't seem like I have access to that link :(. I changed all instances of "setup" and "addon" to "set-up" and "add-on"

Short description

  • When you use a pronoun, make sure that readers understand which noun it refers back to. "Them" might be a little unclear here. Do we have to mention "Helm charts"? I'd say omit that mention if we can.
    Yes, good point. It'll probably make the guide more searchable as well. Removed
  • Also, when you have a name, variable, or the like, put the name before explaining what it is. For example, put "kubectl" before "Kubernetes CLI".
  • Suggested changes: "Explore how to deploy microservices to Kubernetes and manage them with the kubectl Kubernetes CLI."
    Should have read this point first :P This is exactly what I ended up with after making the two changes above

What you'll learn

  • Place punctuation within parenthesis.
  • However, in the case of the parenthesis around "charts," I would simply omit the parenthesis.
  • Put a descriptor word after something in a code phrase, such as, "The kubectl interface is your primary tool..."
  • Missing period at end of the last sentence of the first paragraph.
  • Directional words (like "under" in the second paragraph) are potentially confusing for visually impaired users who get help from screen readers. Could we say "within" or some alternative instead?
    Replaced "under" with "in" when speaking about directories
  • Avoid using "this" as a standalone word. Either add a noun after, such as "This display," or attach it to the other sentence if it won't make the sentence too long, such as "...runs in, which makes..."
    This is what I ended up with: "The name microservice simply displays a brief greeting and the name of the container that it runs in, making it easy to distinguish it from its other replicas. The ping microservice simply pings the {kube} Service that encapsulates the Pods running the name microservice, demonstrating how communication can be established between Pods inside a cluster."
  • "its" is the possessive form of "it." In "its been replicated," you want "it's" because the apostrophe indicates "it is." Also consider rewriting to avoid the pronoun altogether, such as, "...running instance of the microservice from another after the microservice is replicated..."
  • Remove the quotation marks from "pings."
  • "add-on" has a hyphen.

What is Kubernetes?

  • "open source" is not hyphenated.
  • What about something like..."Kubernetes is a major tool in containerized environments. Containers can be useful in all steps of a continuous delivery pipeline."
    Maybe "Over the years, Kubernetes has become a major tool in containerized environments as containers are being more and more utilized for all steps of a continuous delivery pipeline."?

Architecture

  • Try to avoid the use of first person "we" here. Instead, write something like, "Deploying an application to Kubernetes means deploying an application to a Kubernetes cluster."
  • Make sure capitalization is correct. It appears to me that "nodes" is lower case, but "Pods" is upper case. I will defer to the developers' decision on whichever is correct, but please make it consistent.
    I just kept everything capitalized. Kubernetes didn't seem very consistent with their capitalization in their own documentation. It seems through that nodes is usually not capitalized though, so I changed "Nodes" to lowercase.
  • Adverbs that end in "ly" generally do not need to be hyphenated because it's clear that they're adverbs. For example, "closely coupled" does not need a hyphen.
  • Use a comma plus "which" to introduce a nonrestrictive clause. Use "that" to indicate a restrictive clause. Example: "It represents a single running process that encapsulates a container or in some scenarios multiple closely coupled containers."
  • Try to keep words like "However" at the beginning of sentences. If you do use them in the middle, set off the word with commas on either side, such as, "With Open Liberty, however, you can..." Set off other nonessential words like "Of course" with commas, too.
  • You don't need a comma after "cluster" in the last sentence of this section. I'm assuming that you want to say that the Kubernetes object maps external requests to the Services inside a cluster and [the Kubernetes object] provides additional functionality.
    yep :)
  • An illustration/diagram might help show how the different parts of Kubernetes are related.
    I originally had this, but YK was against it. I'll bring it up to him again though.

Why use Kubernetes?

  • I'm thinking we want this section earlier in the doc so that the user will be motivated to learn more about Kubernetes. At least put it above the "Architecture" section. Consider moving some of the info under "What you'll learn" down to the "What is Kubernetes?" section so the reader sees the "Why use Kubernetes" info that much earlier.
  • typo: "experience developers" should be "experienced developers"
  • Info on "24/7" from the IBM word usage guide: "Do not use this abbreviation to indicate high availability, nonstop operation or support, such as for database and e-commerce applications or monitoring. Do not use to indicate the general availability of something, such as service. If you must use an abbreviation, use "24x7" instead. "24x7" is acceptable usage, provided that you are consistent within a document or library. However, if possible, use descriptive wording instead.
    Whenever possible, use descriptive wording, for example, "High-availability databases not only are universally available but also have high reliability and serviceability" or "Operations are monitored 24 hours a day, every day of the week.""
    Replaced with "...and all needing to be run and monitored every day of the week will give...
  • Try to avoid "there" as a subject of a clause.
    Not sure I understand this part. If I split that sentence into two will it be ok?: "Of course this is just a simple example. There is much more underneath the iceberg that is Kubernetes"

Prerequisites

  • The hyphen or dash after each tool sort of resembles a minus sign. The best solution might be to make the bullet points complete sentences. For example, "The kubernetes-cli tool is..."
  • Prepositional phrases like "For installation instructions" should be set off with a comma at the beginning of a sentence.
  • Even if a sentence ends with a hyperlink, it should also end with a period. Just make sure that the period is not included as part of the hyperlink. :)
  • Set off nonessential clauses (like "while you're not limited...") with commas.
    So, it would be like this:? "Kubernetes supports a variety of container types and, while you're not limited to any of them in particular, you should use Docker..."

Starting and preparing your cluster for deployment

  • Unless it's the first word of the title or a word that's always capitalized like a name, the words in a title should be lower case. I see "deployment" as both lower case and upper case in this file.
  • I'd remove the word "Note."
  • typo: "you cluster" should be "your cluster"
  • "add-on" should be hyphenated.
  • I noticed "Ingress" and "Pod" were formatted as code earlier, but here they are not. I'd prefer that we consistently format them the same way.
    I formatted them as code at the start to make them stand out more. I don't think they need to be formatted like that throughout the rest of the guide.
  • "frontend" should be "front end" (noun) or "front-end" (adjective).

Installing a Helm chart release

  • "Temporary instructions" sound kind of strange. How long will they be temporary? If possible, maybe specify a version number that they apply to?
    They'll be gone when the guide is published. There is currently some additional steps that need to be done, which another team is working on adding permenantly to their Helm chart.
  • typo: "resource each" should be "resources each"
  • "quite" can have different meanings. I would remove it altogether.
  • I assume that "Kubelet" in the table is a typo.
    Its actually just the name of a service that Kubernetes uses. I suppose I can change it to Kubernetes though just to avoid confusion.
  • Correct the "to to" and "it will used" typos.
  • Info about "via" from the word usage page: "Use this term, which means "by way of," to refer to routing data, such as in "Messages are routed via SMTP." In other situations, try to replace "via" with one of the following synonyms: "across," along," "by," "from," "on," or "through.""
    Replaced "via the Ingress" with "from the Ingress"

Scaling a deployment

  • Typo? "multiple session...you also saw how your Ingress controller persists session."
    Yep! Good catch. It should be plural.
  • Put a word in code phrase format if it's something the user has to enter/specify, such as setting the parameter to "true."

Rolling out Deployment updates

  • typo: "withing" should be "within"

Automating with Maven

  • Use "an" before "update-deployment profile." "A" or "an" is determined by the word that follows directly after it. "A" is for words that begin with consonants; "An" is for words that begin with vowels.

Testing microservices that are running on Kubernetes

  • typo: "you can use set"

Testing feedback on Mac

Time on guide: 30-40 minutes

SETUP:

  • Add a note about using the latest of Docker version in prereq?

  • need a docker ID.. if using the “docker login” from command line, need to use the “sudo” command!!!!
    https://docs.docker.com/engine/reference/commandline/login/

  • For Minikube installation instructions see https://github.com/kubernetes/minikube. Make sure to read the "Requirements" section as different operating systems require different prerequisites to get Minikube running. => should probably add a statement that if user are working with Mac/Win, they can skip this? as this is the step they may get stuck? Not sure this is enough, “Otherwise you can use Minikube as a single-node Kubernetes cluster that runs locally in a virtual machine.” Perhaps to add a link for Docker for Mac too?

  • kubectl get nodes command is stuck, maybe there’s previous minikube stuffs? -> basically need to go through the Docker for Mac Getting Started instructions, especially the one to enable Kubenetes.

GUIDE:

  • kubectl get pods --all-namespaces should be a copy-able command

  • docker images results need to be updated for win/mac and linux

  • - got a problem rebuilding after making the change in the name server

[INFO] --- versions-maven-plugin:2.7:set (default-cli) @ kube-demo ---
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /Users/evelinec/OLG/testing/draft-guide-kubernetes/start
[INFO] Processing change of io.openliberty.guides:kube-demo:1.1-SNAPSHOT -> 1.2-SNAPSHOT
[INFO] Processing io.openliberty.guides:kube-demo
[INFO] Updating project io.openliberty.guides:kube-demo
[INFO] from version 1.1-SNAPSHOT to 1.2-SNAPSHOT
[INFO]
[INFO] Processing io.openliberty.guides:name
[INFO] Updating parent io.openliberty.guides:kube-demo
[INFO] from version 1.1-SNAPSHOT to 1.2-SNAPSHOT
[INFO]
[INFO] Processing io.openliberty.guides:ping
[INFO] Updating parent io.openliberty.guides:kube-demo
[INFO] from version 1.1-SNAPSHOT to 1.2-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] kube-demo .......................................... SUCCESS [ 0.598 s]
[INFO] name ............................................... SKIPPED
[INFO] ping ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.978 s
[INFO] Finished at: 2018-09-14T14:42:41-04:00
[INFO] Final Memory: 18M/309M
[INFO] ------------------------------------------------------------------------

Above is okay, after running this command:
Next, navigate to the name directory within the start directory and run the mvn clean package command to rebuild the name microservice, then verify that a new name:1.1-SNAPSHOT image was created.

  • test section needs to be rearrange with Win/Mac (ingress addr is “localhost”) vs Linux (ingress addr is an ip). The default addr is “192.168.99.100”
  • the test results (for ping and name services) aren’t displayed all together..
  • at the end of tear down, there are still docker images, need to clean up?

multipane

  • change to page-layout:guide-multipane

Prerequisites

  • "Use the Docker Desktop" --> remove the

Deploying Microservices

  • "To deploy the name and ping applications, create the kubernetes file." --> Create the Kubernetes Configuration File
  • add extra hotspots for image, containerPort, and label

Scaling a deployment

  • under kubectl get pods command the formatting of the table is off when left side bar is open

Testing microservices that are running on Kubernetes

  • include pom.xml
  • update table with hotspots
  • update ip with hotspots

Review feedback

My kubectl installation (brew on Mac) failed (error at the end of this issue) so I couldn't test it, just read it through.

Comments as I was reading:

  • ‘a developer’s primary tool’ - not really - it’s a devops tool, isn’t it? While a development scrum might be responsible for end-to-end story, I think it’s a push to say ‘developer’. Maybe just say 'a primary tool for deployment'....etc

  • seems very long for a guide…too many optional bits. This isn’t meant to be a comprehensive piece of doc. Remove the optional minikube section at the end. It’s good to point them to do something next (I like that) but it’s too long. I think that ‘editing Kubernetes resources using Minikube’ should be (if required) a separate Docs topics that the guide links to. In general, I think there needs to be a clear scope for what the guide is trying to achieve (what the user is to learn from it). If it's too long, they'll not learn it anyway.

  • Don’t offer options (“and while you’re not limited to any of them in particular, you should use Docker”). Sure, say there is support for several but instruct them to install Docker.

  • Don’t say ‘recommended’ - who’s recommending it? It’s not clear. If you want them to install it, just tell them to install it. Don’t hedge - it just leaves the reader unsure about what they have to do.

  • I don’t understand the relevance of the whole paragraph starting: ‘Docker Desktop is a convenient way’ - does Docker Desktop replace the steps above? If so, why are we giving them both sets of instructions? Be dictatorial. Just tell them what to do for the best experience, ie tell them to install Docker Desktop on Mac/Windows and Minikube on Linux, then tell them any additional steps for kubectl etc. Don't make them have to work it out or guess. It seems that with Docker Desktop installed (Mac), I don’t need to install kubernetes? But I do seem to need to install kubectl. Didn't get any further.

  • “If you’re familiar with Maven and Docker, you might be tempted to run a Maven build first and then use the .war file produced by the build to build a Docker image. While this is by no means a wrong approach, ” - just tell them what to do in this scenario. Don’t tell them the alternatives here. eg start the paragraph from “you can build your microservices and Docker image simultaneously …”. Also, is it really ‘simultaneously’? Or just as part of the same build?

  • “If the build is successful” - why wouldn’t it be successful? Is it likely to go wrong? Why? If not, just say “when the build has completed, run…”

  • Style - don’t highlight or capitalise the terms (eg pod, node, controller, etc). It’s distracting and unnecessary. The name of actual resources (eg name and ping) if they don’t stand out from the sentence in any other way is fine to highlight. Service, Pods, etc should all be lower-case - don’t capitalise nouns for the sake of it.

  • 'statefulsets’ and ‘daemonsets’ - if you’re not going to define them, don’t mention them - it’s just confusing/distracting because I'm now wondering why you told me and what I'm to do with that information.

  • present tense for how a technology works eg ‘In a basic scenario, a Kubernetes service exposes a node port…’

  • ‘as well as provides load-balancing ’ - grammar needs fixing; probably sentence needs to be shorter so it’s easier to match the grammar.

  • ’Starting and preparing cluster’ section - missing a Windows/Mac heading somewhere towards the end of the section.

  • Table of parameters should have the qualifier listed in each row for clarity. Actually, I don’t think the table is that useful as you have to go back and forth to understand what it’s telling you. Just describe the key parts of one of the commands. Not all parameters need describing, probably? Link to a reference topic of all the parameters so someone really interested can go find out. The purpose of hte guide is not comprehensive documentation but to explain why the app does what it does and what it achieves. The table is not ‘breaking it down’ - it’s just presenting the reader with a bunch of information that they have to link together.

  • Present tense for describing how the technology works. eg ‘The first URL returns a brief greeting…’ “You can see a brief message”, “…no special messages are displayed” etc

  • What’s an “apiserver”? (not a real word...check this whole paragraph to make sure it makes sense)

==> Downloading https://homebrew.bintray.com/bottles/kubernetes-cli-1.11.3.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e1/e1859f9f893237aa977be328846481b362e147ae92c2cde3e65a7d445b02dae9?__gda__=exp=1537366208~hmac=7a9f9feff6d49dab962f0082cc5dc5a19128de382c663482d00cb66553274ae9&response-content-disp
######################################################################## 100.0%
Error: No such file or directory @ dir_chdir - /usr/local/Cellar
Warning: Bottle installation failed: building from source.
==> Installing dependencies for kubernetes-cli: go
==> Installing kubernetes-cli dependency: go
==> Downloading https://homebrew.bintray.com/bottles/go-1.11.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d2/d2dfd9846bc03498dd69c01eaccc0a3018a66d00864d7433d70f07645aac6a40?__gda__=exp=1537366210~hmac=bd93f2bfa882de1a92b2cdae54f154499c87fdd23249a097d25125cc1532f3ca&response-content-disp
######################################################################## 100.0%
Error: No such file or directory @ dir_chdir - /usr/local/Cellar
Warning: Bottle installation failed: building from source.
==> Downloading https://dl.google.com/go/go1.11.src.tar.gz
######################################################################## 100.0%
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `write': Broken pipe (Errno::EPIPE)
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `puts'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `rescue in block (3 levels) in safe_fork'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:31:in `block (3 levels) in safe_fork'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:in `fork'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:in `block (2 levels) in safe_fork'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:in `open'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:in `block in safe_fork'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:26:in `safe_fork'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:719:in `build'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:311:in `install'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:572:in `install_dependency'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:in `block in install_dependencies'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:in `each'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:in `install_dependencies'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:394:in `compute_and_install_dependencies'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:300:in `rescue in install'
	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:287:in `install'
	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:321:in `install_formula'
	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:253:in `block in install'
	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:in `each'
	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:in `install'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: An exception occured within a build process:
  Errno::EPERM: Operation not permitted @ dir_s_mkdir - /usr/local/Cellar

User Feedback the Kubernetes guide for MAC user

Timing

Without the optional part: 40 minutes
mvn package and mvn verify took up more than 5 minutes in the process

Optional part alone: 10 minutes

General Feedback

The guide took relatively long compare to other open liberty guide, but it is very informative in terms of covering different major aspects of Kubernetes. Compare my past experience with other Kubernetes tutorials and online courses, this guide did cover the similar topics with the addition of explaining more about ingress; but enabling the ingress allows audience to see the product so it is a good thing to have.

Section Feedback

What you will Learn

  • the sentence "making it easy to distinguish it from its other replicas:” might need rephrasing

Starting and preparing your cluster for deployment

  • one of the command: kubectl get pods —all-namespaces cannot get copied, does not line up with other command well

Scaling a deployment

  • "Wait until 2 pods are ready": maybe mention again how to check for user's convenience

  • Audience might need more clarification about the difference in unique and non-unique sessions

Rolling out Deployment updates

  • After navigate to the name directory, user just stayed there for the rest of the guide. Just wondering if this is a normal thing to do or should user navigate back to the start directory.

Testing microservices that are running on Kubernetes

  • There are 3 cases with corresponding instructions to run; but the way the instructions are presented made it confusing to audience. Audience might think it's three sequential steps, this situation can be solved by choosing a different kind of markdown.

Optional: Editing Kubernetes resources using Minikube

  • The title is somewhat misleading because the instruction underneath says that one can use editing without minikube.

  • The position of this part is very awkward. It would make more sense to place it before "Tearing down the chart releases"; so user still have access to the application that they installed.

  • the third paragraph is not as instructive as the rest of the guide, an actual example that works with this guide would be helpful to add along side this generic expression kubectl edit (RESOURCE/NAME | -f FILENAME) [options]

Hardcoding the cluster ip

While testing the guide and found that the <cluster.ip>192.168.99.100</cluster.ip> is hardcoded in the pom. This is a problem in my test, as the ip was different, ie, 192.168.99.101. Thus the test wouldn't pass.

Although I only get a test case failure after updating the greeting message.

Pls investigate.

Pre-Publishing Tests

Pre-Publishing Tests

  • Check appearance (contents, headings, paragraphs, code snippets, outputs) of the guide on test site, ie, qa-guides
  • Clone repo and test finish directory with no error
  • Follow the guide to test that it is working

Feedback

  • "Make sure you have the Docker version with the Docker Desktop support" -> "Make sure you have a Docker version with Docker Desktop support."

The way it is currently makes it sound like there is only one version of Docker that has Docker Desktop support.


  • After following the instructions and running docker images, I noticed that gcr.io/google_containers/defaultbackend wasn't listed when looking through the results of the command.

I realize the guide says to verify name:1.0-SNAPSHOT and name:1.0-SNAPSHOT are among the list (which they were), but I am not sure there is a point listing out images in the guide output that aren't present.


  • "Scaling is one of the primary advantages of Kubernetes because replicating your application allows it to accommodate more traffic, and then descale your deployments to free up resources when the traffic decreases."

But in the guide it only shows how to scale and doesn't actually demonstrate how to descale your deployments. Perhaps you can provide more details in the scaling section (as suggested here #63) and explain the --replicas=3 part of the command and how decreasing the replicas allows you to descale? Or w.e. the correct way to descale your deployments in kubernetes is.


  • Only 1 name pod running after redeploy

I understand this is expected behaviour, but perhaps it might be worth mentioning. Since the section before this is "Scaling a deployment" and someone might expect to see 3 name pods after redeploying. Or even just as a friendly reminder that after redeploying, you will have to rescale.

Unused import in NameEndpointTest and PingEndpointTest

Following import not necessary in NameEndpointTest and PingEndpointTest

import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.security.cert.X509Certificate;
import java.security.cert.X509Certificate;```

Improve SEO for this guide

We can improve the SEO for a direct link to this guide. I believe these are the attributes with some examples from an existing OL.io blog post

seo-title: Build and push Spring Boot Docker images with boost-maven-plugin - OpenLiberty.io
seo-description: Efficiently build and push layered Docker images of Spring Boot applications using the Boost Maven plugin.

Multipane Issues

  • Guide fails with Java 11 (needs to be synchronized with master branch). pom.xml hotspots would then need to get updated.

Prerequisites

  • None of the links in this section open in a new tab

Deploying the microservices

  • name:1.0-SNAPSHOT is in blue text but ping:1.0-SNAPSHOT is in black text. Both these lines get highlighted at the same time with one hotspot, so the difference will be obvious to the user.
    image

NOTE: Same issue with containerPort for the deployments

Consider a way to report build version in tests

The tests in this guide do not generate a console.log, thus the common way to report the build version in the tests does not work. Need to work out a way to report the build version in automated tests.

Present platform-specific commands appropriately

With the use of Docker for Windows and Docker for Mac that come with Kubernetes for Windows and Mac respectively, we will need to cover different commands for different platforms. (Kube is a separate install for Linux.)

We need to work out the best possible way to present this within what we have today, update the (draft) guide accordingly, and take it up for review and feedback.

Should clean up the guide where appropriately given these latest considerations too.

Daily build test issues

The daily build test does not modify the correct pom.xml to point to the daily builds. Current script (below) modifies both the pom for both the name and ping services, but there's no liberty runtime configuration there.. The liberty runtime config is at the parent pom.xml in the root directory.

sed -i "\#<assemblyArtifact>#,\#</assemblyArtifact>#c<install><runtimeUrl>https:\/\/public.dhe.ibm.com\/ibmdl\/export\/pub\/software\/openliberty\/runtime\/nightly\/2019-04-19_0807\/openliberty-all-19.0.0.4-cl190420190419-0642.zip<\/runtimeUrl><\/install>" ping/pom.xml name/pom.xml; cat name/pom.xml ping/pom.xml; sed -i "s;FROM open-liberty;FROM [secure]/olguides:cl190420190419-0642;g" ping/Dockerfile name/Dockerfile; echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; ../scripts/travisTest.sh;

Peer review

  • “Explore how to deploy microservices to Kubernetes using Helm charts and manage them with kubectl”
    At first I don't know what is kubectl at all, so when I read the last bit I was really confused what is kubectl and I googled it, then I saw you define it in pre-requisite section. You may want to move the explanation a bit earlier?

  • "scaling Deployments"
    Capitalizing Deployments? If it's a special term you may want to quote it, otherwise it looks like an error.

  • You may want to move the pre-requisite section before "What is Kubernetes?" or even "What you’ll learn" cuz it defines words that are frequently used in the beginning sections, and assume users don't know them...

  • You may want to provide links for installing these pre-requisites? As for me, finding how to installing these pre-req took me a lot of time.

  • I found that if you don't use the command line to install virtualbox on mac, you won't be able to install minikube. At first I just installed virtualbox thru a .dmg file and then minikube installation didn't work.
    Minikube is fairly unstable. Panagiotis also run into a lot of issues while setting up minikube. Not sure if there is much we can do...

  • You may want to ask users to navigate to start directory first in the "Building and containerizing the microservices" section.

  • Also, you may want to ask users to run Docker first in the "Building and containerizing the microservices" section. I didn't know to start Docker first until my mvn package failed.
    You shouldn't need to start Docker as the Docker CLI should point to Minikube's docker daemon. I've added a short sentence to explain this right before the mvn package bit.

  • What does "Temporary instructions:" mean? Optional? Can they be skipped?
    Temp instructions wont be there in the published guide. They're necessary until our chart gets patched as the Ingress currently uses outdated NGINX annotations

  • I got this message

junyis-mbp:start junyisun$ kubectl describe pods ol-name-ibm-open-liberty-84fcb9475d-r25rm
Name:           ol-name-ibm-open-liberty-84fcb9475d-r25rm
Namespace:      default
Node:           minikube/10.0.2.15
Start Time:     Tue, 05 Jun 2018 16:58:52 -0400
Labels:         app=ol-name-ibm-open-liberty
                pod-template-hash=4097650318
Annotations:    <none>
Status:         Pending
IP:             172.17.0.7
Controlled By:  ReplicaSet/ol-name-ibm-open-liberty-84fcb9475d
Containers:
  ibm-open-liberty:
    Container ID:   
    Image:          name:1.0-SNAPSHOT
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Readiness:      http-get http://:9080/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:
      JVM_ARGS:                      
      WLP_LOGGING_CONSOLE_FORMAT:    json
      WLP_LOGGING_CONSOLE_LOGLEVEL:  info
      WLP_LOGGING_CONSOLE_SOURCE:    message,trace,accessLog,ffdc
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-8rndj (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          False 
  PodScheduled   True 
Volumes:
  default-token-8rndj:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-8rndj
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                 Age               From               Message
  ----     ------                 ----              ----               -------
  Normal   Scheduled              6m                default-scheduler  Successfully assigned ol-name-ibm-open-liberty-84fcb9475d-r25rm to minikube
  Normal   SuccessfulMountVolume  6m                kubelet, minikube  MountVolume.SetUp succeeded for volume "default-token-8rndj"
  Normal   Pulling                4m (x4 over 6m)   kubelet, minikube  pulling image "name:1.0-SNAPSHOT"
  Warning  Failed                 4m (x4 over 6m)   kubelet, minikube  Failed to pull image "name:1.0-SNAPSHOT": rpc error: code = Unknown desc = Error response from daemon: pull access denied for name, repository does not exist or may require 'docker login'
  Warning  Failed                 4m (x4 over 6m)   kubelet, minikube  Error: ErrImagePull
  Normal   BackOff                4m (x6 over 6m)   kubelet, minikube  Back-off pulling image "name:1.0-SNAPSHOT"
  Warning  Failed                 1m (x20 over 6m)  kubelet, minikube  Error: ImagePullBackOff

Then when I visited the two links, I got 503 HTTP error.

  • Cannot proceed... stuck in this step...
junyis-mbp:start junyisun$ kubectl get pods
NAME                                        READY     STATUS             RESTARTS   AGE
ol-name-ibm-open-liberty-84fcb9475d-r25rm   0/1       ImagePullBackOff   0          11m
ol-ping-ibm-open-liberty-6cb6ffd7b6-w6jnp   0/1       ErrImagePull       0          11m
  • Okay, after asking Dmitry, I fixed the two points above.

  • It's probably better to make commands as new-line, so that every command is copiable.

  • When I ran kubectl get services, I got

NAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
kubernetes                 ClusterIP   10.96.0.1        <none>        443/TCP    18h
ol-name-ibm-open-liberty   ClusterIP   10.99.192.181    <none>        9080/TCP   2m
ol-ping-ibm-open-liberty   ClusterIP   10.101.113.195   <none>        9080/TCP   2m

doesn't seem to have a mapping?

  • "Alternative: deploying the microservices without an Ingress"
    Can you make it clearer when you talk about "Ingress is disabled by default, so all you need to do is omit all Ingress-related parameters." in the alternative approach section? like what parameters to omit exactly? can you show the final command?

  • "Rolling out Deployment updates"
    Please indicate where to make the change? in the start folder right?

  • I personally feel that there are too many alternative options. Beginners may get lost by trying different alternatives, but not following the sequential logic.
    yeah there is a lot, but while playing around with kubernetes myself, I found that it would have been really helpful to know all of these; ie. editing in various ways, scaling things, plus all the details with how deployments are updated (using different image cersion or not)

  • Overall, it's a very detailed guide. Great work!

Tommy's Feedback

Hello, so this guide was very well done. I had no issues understanding any of the content or executing any of the commands being ran in this guide. There was a smooth and logical flow from one topic to the next making each bit of information easy to digest for even a novice user of Kubernetes. I only had tiny issues with the guide, one being the way some links were provided e.g. "To learn about the various Kubernetes resources that you can configure, see the https://kubernetes.io/docs/concepts/." the ending of this sentence just sounds awkward. Instead of "see the " perhaps just hyperlink it. This wasn't a common issue throughout the guide, I had little to no issue with how most links were provided, but by hyperlinking you might be able to give the guide a cleaner appearance. My only other issue was the separation of environments. The guide tells you if you are on Mac or Windows use Docker and if you are on Linux use Minikube. It would probably be more logical to separate these by Docker and Minikube and not operating system as I was able to complete the guide smoothly on MacOS with both Minikube and Docker. The guide should allow the user to use the technology that they feel is suitable and not limit them by OS especially when both technologies work on the OS. Besides those small issues I had a great experience and I was able to complete the guide in around 25 minutes.

Few minor things on 9/21's draft

Tested the latest guide on Mac and everything is working. Few minor things that need to be addressed:

  • The start/ directory to be specified as start

  • The curl command didn't work:

curl http:localhost:31000/api/name
curl: (3) Port number ended with 'l'
  • The guide's duration can be 20-30 minutes now

Is something missing from the section: "Next you will make requests to your services."

I have been walking through this guide and everything seems to be working up to the point where I am supposed to be able to connect to the running services. This step does not appear to work. Is there a missing step prior to this to expose the ip addresses?

If I run: minikube service --all --ulr I get the following:

😿 service default/hello-world has no node port
😿 service default/hello-world-nodes has no node port
😿 service default/kubernetes has no node port
|-----------|-------------------|--------------|---------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|-------------------|--------------|---------------------------|
| default | hello-world | No node port |
| default | hello-world-nodes | No node port |
| default | inventory-service | 9080 | http://192.168.49.2:32000 |
| default | kubernetes | No node port |
| default | system-service | 9080 | http://192.168.49.2:31000 |
|-----------|-------------------|--------------|---------------------------|
🏃 Starting tunnel for service hello-world.
🏃 Starting tunnel for service hello-world-nodes.
🏃 Starting tunnel for service inventory-service.
🏃 Starting tunnel for service kubernetes.
🏃 Starting tunnel for service system-service.
❗ Because you are using a Docker driver on windows, the terminal needs to be open to run it.

I then try to open "http://192.168.49.2:31000" to connect to the system-service in a browser and it times out.

What am I missing?

Failed to Inject @ConfigProperty for key SYS_APP_HOSTNAME

I've managed to build docker images and applied the kubernetes.yaml.
The system app works fine

% kubectl wait --for=condition=ready pod -l app=system
pod/system-deployment-86f67f8948-rn88b condition met

but the inventory app doesn't

 % kubectl wait --for=condition=ready pod -l app=inventory
error: timed out waiting for the condition on pods/inventory-deployment-6657bb46ff-b2vg9

Logs of the Pod inventory shows:

start % kubectl logs inventory-deployment-6657bb46ff-b2vg9  

Launching defaultServer (Open Liberty 23.0.0.1/wlp-1.0.73.cl230120230123-2118) on Eclipse OpenJ9 VM, version 11.0.17+8 (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://inventory-deployment-6657bb46ff-b2vg9:9080/health/
[ERROR   ] CWWKZ0002E: An exception occurred while starting the application guide-kubernetes-intro-inventory. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DeploymentException: SRCFG02000: Failed to Inject @ConfigProperty for key SYS_APP_HOSTNAME into io.openliberty.guides.inventory.health.InventoryReadinessCheck.hostname since the config property could not be found in any config source
[AUDIT   ] CWWKF0012I: The server installed the following features: [cdi-3.0, concurrent-2.0, jndi-1.0, json-1.0, jsonb-2.0, jsonp-2.0, mpConfig-3.0, mpHealth-4.0, restfulWS-3.0, restfulWSClient-3.0, servlet-5.0].
[AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 5.927 seconds.
[WARNING ] CWMMH0053W: The readiness health check reported a DOWN overall status because the following applications are not started yet: [guide-kubernetes-intro-inventory]

It looks like inventory app needs the deployed host of the system app. How can I pass a value to SYS_APP_HOSTNAME?
Is this error expected?


Environment: MacOS, Docker Desktop, Minikube.

Simplify instructions for Docker for Windows

When using Docker for Windows, Kubernetes is now built-in and does not require explicit installation of minikube and kubectl. The instructions generally need to talk about "kubernetes" rather than "minikube", getting explicit only for how the pre-reqs are installed and started. Beyond that, kube is kube.

Review

Very good guide.

Some minor changes needed.

The unreleased Open Liberty Helm Chart version 1.5 contains the fix for using new NGINX annotations and some of the parameters have changed. The guide needs be updated accordingly.

  • secureBackends (under ingress) was removed - the logic is now controlled by ssl.enabled.
  • service now has enabled argument - default value is true

Testing feedback on Ubuntu to be added to setup instructions

  • all docker commands requires “sudo”.. or add username to the “docker” group..

  • install minikube command need “sudo” as well

    • minukube requirement: kubectl, VirtualBox or KVM, VT-x/AMD-v virtualization
    • really need instruction to install/configure each of the above
  • kubectl installation should go before minikube? as kubectl is the prereq for minikube

  • mvc package failed:

[INFO] Compiling 2 source files to /home/ibmadmin/guides/draft-guide-kubernetes/start/name/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] kube-demo .......................................... SUCCESS [ 0.009 s]
[INFO] name ............................................... FAILURE [ 45.936 s]
[INFO] ping ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.874 s
[INFO] Finished at: 2018-09-14T17:13:09-04:00
[INFO] Final Memory: 17M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project name: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :name

FIX: install JDK:
https://stackoverflow.com/questions/14788345/how-to-install-the-jdk-on-ubuntu-linux

ibmadmin@ectestvm:~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

[INFO] Building Docker context /home/ibmadmin/guides/draft-guide-kubernetes/start/name
[INFO]
[INFO] Image will be built as name:1.0-SNAPSHOT
[INFO]
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[WARNING] An attempt failed, will retry 1 more times
org.apache.maven.plugin.MojoExecutionException: Could not build image
at com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:185)
at com.spotify.plugin.dockerfile.BuildMojo.execute(BuildMojo.java:105)

[INFO] Reactor Summary:
[INFO]
[INFO] kube-demo .......................................... SUCCESS [ 0.003 s]
[INFO] name ............................................... FAILURE [01:34 min]
[INFO] ping ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2018-09-17T10:09:48-04:00
[INFO] Final Memory: 34M/191M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.0:build (default) on project name: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: Permission denied -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :name

FIX: To use docker command without sudo , let's add our user to docker group, in this case am adding $USER user to docker group
https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo

  • docker images output is shorter on Ubuntu:

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ docker images
WARNING: Error loading config file: /home/ibmadmin/.docker/config.json: stat /home/ibmadmin/.docker/config.json: permission denied
REPOSITORY TAG IMAGE ID CREATED SIZE
ping 1.0-SNAPSHOT 80a73ed3882b 4 minutes ago 543MB
name 1.0-SNAPSHOT 8aa5c70de565 4 minutes ago 543MB
open-liberty latest 0bd5dbb2459b 11 days ago 501MB
hello-world latest 2cb0d9787c4d 2 months ago 1.85kB

BASICALLY, the above output is incomplete/incorrect.

  • kube pods take longer to be ready on Ubuntu:

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 2m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 1m

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 4m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 3m

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 10m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 8m

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 14m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 13m

FIX: need to configure the Docker CLI to use Minikube’s Docker daemon, ie, command eval $(minikube docker-env), AGAIN, because of the change of environment during adding the user into the “docker” group by logout and login again.
THEN, at this point, need to clean up the helm chart installations, and do them again!

  • Ingress hostname:

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
ol-name-ibm-open-liberty * 10.0.2.15 80 7m
ol-ping-ibm-open-liberty * 10.0.2.15 80 7m

But the default curl -k https://192.168.99.100/name/ works!

  • takes 3 minutes for pods to be ready after updating the image tags to a new image version:

ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start/name$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-64d55f446d-4xzm9 1/1 Running 0 3m
ol-name-ibm-open-liberty-64d55f446d-lhjnp 1/1 Running 0 2m
ol-name-ibm-open-liberty-64d55f446d-trs72 1/1 Running 0 3m
ol-ping-ibm-open-liberty-5f884cc9cb-dtzqq 1/1 Running 0 17m

  • If you rolled out an unstable Deployment update, then you can revert the Deployment back to a older revision by viewing its revision history. => If you rolled out an unstable Deployment update, then you can revert the Deployment back to an older revision by viewing its revision history.

User review feedback

From Tommy so far:
I think the "what is kubernetes" section should be before the "what you will learn" section since there are references to technical details about kubernetes inside of the "what you will learn" section. Nobody will really understand what they "will learn" unless they already have prior knowledge.
I originally tried this lab through my ubuntu vm on command prompt but I had to stop because I couldn't get V Box Manager on it through the command line. Regardless, there was one annoying startup issue with helm downloading and installing helm. I found running these few lines were easier:
$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
$ chmod 700 get_helm.sh
$ ./get_helm.sh

For windows when it says to "try hyper v instead" it might just be easier to put the windows commands for that step
minikube start --vm-driver=hyperv --hyperv-virtual-switch=minikube-virtual-switch
otherwise the user will have to figure that out on their own. The other windows commands appeared to work after this until you had to point minikube to your local docker where I ran into more issues.

User Feedback (Windows)

The new guide (without Ingess', helm and optional section) is a lot more manageable in the allocated time. Overall everything was easy to setup (Docker for Windows) and I didn't run into any issues.

Although, the entire guide still took me roughly 50 minutes (not counting pre-requisites). This is largely due to the fact that the first mvn package command took ~19 minutes.

General

  • Pods is in backticks towards the start of the guide, but isn't towards the end. Should be consistent and either use Pods or Pods.

Prerequisites

  • When selecting Enable Kubernetes in Docker, there are two sub-options: Kubernetes and Swarm (default). Might be good to specify which one to select.

Building and containerizing the microservices

  • First mvn package takes a long time (~19 minutes)
  • "If the build is successful" -> Should write with certainty, maybe: "When the build is successful"
  • Quay.io/kubernetes-ingress-controller/nginx-ingress-controller not present after running docker images even though build was successful

Deploying the applications

  • A Kubernetes Deployment is a resources responsible for -> typo
  • Run the following commands to deploy the resources as define in kubernetes.yaml -> typo

Scaling a deployment

  • Scaling is one of the primary advantages of Kubernetes because it allows to accommodate more traffic, -> "because it allows to accommodate traffic" sounds awkward, consider re-wording
  • and descale them to free up resources when the traffic decreases. -> can be ambiguous, de-scale what?

Testing microservices that are running on Kubernetes

  • To run the tests, wait for all Pods to be in the ready state, then run the mvn verify command. -> This part is confusing, should the user be running mvn verify right now? Or is this referring to the mvn verify command that comes up later in this section?

Great work! You're done!

  • You then scaled a microservice, ran integration tests against miroservices that are running in a Kubernetes cluster. -> You then scaled a microservice and ran integration tests against miroservices that are running in a Kubernetes cluster.

dev mode peer review - macOS

  • Extra period between inventory and Kubernetes Service
Screen Shot 2020-01-09 at 3 36 23 PM
  • I think Deployment should be lowercase
Screen Shot 2020-01-09 at 3 42 10 PM
  • docker should be Docker and system should be wrapped with ``
Screen Shot 2020-01-09 at 3 42 22 PM
  • Plugin version not found. I think the groupId should be <groupId>io.openliberty.tools</groupId>
Screen Shot 2020-01-09 at 4 00 27 PM Screen Shot 2020-01-09 at 4 01 09 PM
  • The command should be mvn failsafe:integration-test -Ddockerfile.skip=true -Dcluster.ip=localhost
Screen Shot 2020-01-10 at 10 48 14 AM

User Review on Windows Machine

Timing

Kubernetes Guide without optional section: ~ 55 minutes
Optional section (alone): ~ 15 minutes

Overall Feedback:

After reading the Windows/Mac version and I see a Linux step, I feel the need to read through the Linux step to make sure I didn't miss anything else that was meant for the Windows/Mac version. There were also times when I ran the Linux command instead of the Windows/Mac.

  • Perhaps we could have two separate guides or links for Windows/Mac and Linux instead of putting them together.

The user also only edits the code one time to change the greeting message in NameResource.java. Otherwise, the start and finish directory are identical.

  • Is it necessary to have a start/finish structure for this guide?

Who is the audience of this guide? Are all sections necessary for this audience?

  • This guide is quite long so maybe it is worth thinking about splitting it up into parts.

The prerequisites took a bit of time to complete and involved navigating to several external websites

  • It may be worthwhile to create our own set of pre requisites on the OL site

Specific Feedback:

Starting and preparing your cluster for deployment

$ kubectl get pods --all-namespaces

  • There is an extra '$' that was probably copied by accident that should be removed

Installing a Helm chart release

helm install --name ol-name --set image.pullPolicy=IfNotPresent --set image.repository=name --set image.tag=1.0-SNAPSHOT --set ssl.enabled=false --set service.port=9080 --set service.targetPort=9080 --set ingress.enabled=true --set ingress.rewriteTarget=/api/name --set ingress.path=/name ibm-charts/ibm-open-liberty
and
helm install --name ol-ping --set image.pullPolicy=IfNotPresent --set image.repository=ping --set image.tag=1.0-SNAPSHOT --set ssl.enabled=false --set service.port=9080 --set service.targetPort=9080 --set ingress.enabled=true --set ingress.rewriteTarget=/api/ping --set ingress.path=/ping ibm-charts/ibm-open-liberty

  • This command does not work properly in git bash, this may be worth noting if users are using git bash

Scaling a deployment

  • It may be helpful to give users an example of how to create a unique session vs. non-unique session (ex. to open an incognito window)

Testing micro services that are running on Kubernetes

  • Should include a line that tells user they need to navigate
  • It felt especially unclear which mvn verify command to run because when there were separate instructions for which machine you were working with previously, it showed Windows/Mac and Linux, also the ordering is different from the rest of the guide which usually showed Windows/Mac instructions BEFORE Linux instructions

Tearing down chart releases

  • This section should be included after the Optional portion of the guide OR there should be a disclaimer to not tear anything down if you want to try the optional section

Optional: Editing Kubernetes resources using Minikube

  • The title is misleading since you can use the Kubernetes dashboard directly to edit the kubernetes resources
  • The instructions to access the ingress resource through the dashboard UI could be more clear (ex. "Click on Ingresses under Discovery and Load Balancing")

mvn install fail

Although the guide does not ask users to run mvn install and mvn clean, the pom.xml or whatever should handle it gracefully

Dev mode peer review

Tested on a fresh Ubuntu 18 install, using the dev-mode branch and verified on the lgdev site.

  • command substitutions should use the following command syntax $(command) vs 'command' as shown:
    image

  • Since we're updating the guide, might as well address hotspot issues, numbers #125 #124.

Develop Cloud Native apps on OpenShift with Open Liberty

Lab 2: Develop Cloud Native apps on OpenShift with Open Liberty
https://compete.ide.skillsnetwork.site/competitions/build-smart-on-kubernetes-challenge

Hello, I don't know if I did the wrong lab, but when following the steps it shows an error when fetching the image. I followed the suggested steps correctly. I know that a wrong item does not make me complete the activity. Should I change the image that the file suggested?

theia@theiadocker-casamento:/home/project/guide-kubernetes-intro/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
inventory-deployment-6fd48545f4-kmnc6 0/1 ImagePullBackOff 0 7s
system-deployment-6594d9c887-q4djs 0/1 ImagePullBackOff 0 7s

Error after updating the images names and nodePorts

I had following error when I updated the image names with the following commands:

sed -i 's=system:1.0-SNAPSHOT=us.icr.io/'"$SN_ICR_NAMESPACE"'/system:1.0-SNAPSHOT\n imagePullPolicy: Always=g' kubernetes.yaml
sed -i 's=inventory:1.0-SNAPSHOT=us.icr.io/'"$SN_ICR_NAMESPACE"'/inventory:1.0-SNAPSHOT\n imagePullPolicy: Always=g' kubernetes.yaml
sed -i 's=nodePort: 31000==g' kubernetes.yaml
sed -i 's=nodePort: 32000==g' kubernetes.yaml

theia@theiadocker-ozcanli:/home/project/guide-kubernetes-intro/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
inventory-deployment-687448ffb9-mwpq7 0/1 ErrImagePull 0 14s
system-deployment-575975cff6-wvjdq 0/1 ErrImagePull 0 14s
theia@theiadocker-ozcanli:/home/project/guide-kubernetes-intro/start$ kubectl describe pods
Name: inventory-deployment-687448ffb9-mwpq7
Namespace: sn-labs-ozcanli
Priority: 1
Priority Class Name: normal
Node: 10.241.64.63/10.241.64.63
Start Time: Fri, 26 Aug 2022 11:19:07 +0000
Labels: app=inventory
pod-template-hash=687448ffb9
Annotations: cni.projectcalico.org/containerID: dc054a4544bfcac26d67d733dc6a98502079f2382210c036f68697a93d64c8b3
cni.projectcalico.org/podIP: 172.17.188.245/32
cni.projectcalico.org/podIPs: 172.17.188.245/32
kubernetes.io/limit-ranger:
LimitRanger plugin set: cpu, ephemeral-storage, memory request for container inventory-container; cpu, ephemeral-storage, memory limit for...
kubernetes.io/psp: ibm-privileged-psp
Status: Pending
IP: 172.17.188.245
IPs:
IP: 172.17.188.245
Controlled By: ReplicaSet/inventory-deployment-687448ffb9
Containers:
inventory-container:
Container ID:
Image: us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT
Image ID:
Port: 9080/TCP
Host Port: 0/TCP
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Limits:
cpu: 500m
ephemeral-storage: 5Gi
memory: 512Mi
Requests:
cpu: 200m
ephemeral-storage: 512Mi
memory: 128Mi
Environment:
SYS_APP_HOSTNAME: system-service
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ww4k7 (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-ww4k7:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: Burstable
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 600s
node.kubernetes.io/unreachable:NoExecute op=Exists for 600s
Events:
Type Reason Age From Message


Normal Scheduled 21s default-scheduler Successfully assigned sn-labs-ozcanli/inventory-deployment-687448ffb9-mwpq7 to 10.241.64.63
Normal BackOff 18s kubelet Back-off pulling image "us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT"
Warning Failed 18s kubelet Error: ImagePullBackOff
Normal Pulling 4s (x2 over 20s) kubelet Pulling image "us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT"
Warning Failed 3s (x2 over 19s) kubelet Failed to pull image "us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT": rpc error: code = NotFound desc = failed to pull and unpack image "us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT": failed to resolve reference "us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT": us.icr.io/sn-labs-ozcanli/inventory:1.0-SNAPSHOT: not found
Warning Failed 3s (x2 over 19s) kubelet Error: ErrImagePull

Name: system-deployment-575975cff6-wvjdq
Namespace: sn-labs-ozcanli
Priority: 1
Priority Class Name: normal
Node: 10.241.64.63/10.241.64.63
Start Time: Fri, 26 Aug 2022 11:19:06 +0000
Labels: app=system
pod-template-hash=575975cff6
Annotations: cni.projectcalico.org/containerID: ceca5ddacacb74d49c02f72ead7f8b57482098d0709432a2c40ca50d79845b6d
cni.projectcalico.org/podIP: 172.17.188.227/32
cni.projectcalico.org/podIPs: 172.17.188.227/32
kubernetes.io/limit-ranger:
LimitRanger plugin set: cpu, ephemeral-storage, memory request for container system-container; cpu, ephemeral-storage, memory limit for co...
kubernetes.io/psp: ibm-privileged-psp
Status: Pending
IP: 172.17.188.227
IPs:
IP: 172.17.188.227
Controlled By: ReplicaSet/system-deployment-575975cff6
Containers:
system-container:
Container ID:
Image: us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT
Image ID:
Port: 9080/TCP
Host Port: 0/TCP
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Limits:
cpu: 500m
ephemeral-storage: 5Gi
memory: 512Mi
Requests:
cpu: 200m
ephemeral-storage: 512Mi
memory: 128Mi
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-lk2rt (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-lk2rt:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: Burstable
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 600s
node.kubernetes.io/unreachable:NoExecute op=Exists for 600s
Events:
Type Reason Age From Message


Normal Scheduled 22s default-scheduler Successfully assigned sn-labs-ozcanli/system-deployment-575975cff6-wvjdq to 10.241.64.63
Normal BackOff 17s kubelet Back-off pulling image "us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT"
Warning Failed 17s kubelet Error: ImagePullBackOff
Normal Pulling 5s (x2 over 19s) kubelet Pulling image "us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT"
Warning Failed 4s (x2 over 18s) kubelet Failed to pull image "us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT": rpc error: code = NotFound desc = failed to pull and unpack image "us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT": failed to resolve reference "us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT": us.icr.io/sn-labs-ozcanli/system:1.0-SNAPSHOT: not found
Warning Failed 4s (x2 over 18s) kubelet Error: ErrImagePull
theia@theiadocker-ozcanli:/home/project/guide-kubernetes-intro/start$

Multipane - Post-publish test

  • Check appearance (contents, headings, paragraphs, code snippets, outputs, links, hotspots) of the guide on test site, ie, qa-guides
  • Read through the guide
  • Clone repo and test finish directory with no error
  • Run diff -r start/ finish/
  • Follow the instruction in the guide to test that it is working
  • Use the copy buttons instead of typing
  • Links open in new tab
  • Action arrows do not highlight any code
  • Update action arrows have hotspotted text underneath
  • Full files mentioned in the guide as hotspots should not highlight any code
  • Hovering over code commands should switch to the right file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.