The DevOps Toolkit Working with Jenkins X

The DevOps Toolkit: Working with Jenkins X | Quiz Answers

  • Post comments:0 Comments
  • Reading time:12 mins read

Module: What is Jenkins X?

1. Can we install Jenkins X in an existing Kubernetes Cluster?

  • Yes
  • No

2. Can you practice Jenkins X locally using Minikube or Docker Desktop?

  • Yes
  • No

3. Why can’t we use Minikube or Docker Desktop for Jenkins X?

  • They are not supported in Jenkins X.
  • Because their clusters are not publicly accessible and can not trigger GitHub web-hooks.
  • They don’t scale.

4. Do we need to enable billing for the project on our cloud provider?

  • Yes
  • No

5. Why do we run compliance tests?

  • Compliance tests are mandatory to run before we can install Jenkins X in an existing Kubernetes cluster.
  • Compliance tests verify whether your cluster complies with Kubernetes specifications and best practices.

6. Which command is used to install Jenkins X in an existing Kubernetes cluster?

  • jx create cluster
  • jx install cluster
  • jx install

Module: Exploring Quickstart Projects

1. Quickstart projects are skeleton projects that we can use for the basis of our own applications.

  • True
  • False

2. What is the purpose of the —-batch-mode flag?

  • It creates a batch file in the project.
  • It lets you run the process without any human intervention.

3. What does Skaffold do?

  • Skaffold handles the workflow for building, pushing, and deploying applications to Kubernetes clusters, as well as for local development.
  • Skaffold contains Helm definitions that will be used to deploy our application to Kubernetes.

4. How do we trigger the build of the application in Jenkins X?

  • We have a command to build the application.
  • Making changes in the file locally triggers the build.
  • Pushing a change to the git repository triggers a webhook that starts the build.

5. What is the purpose of the —-filter flag?

  • The filter flag lets us filter the output to the most recent build.
  • The filter flag lets use text to filter the pipeline names.

6. What is the command to retrieve information regarding Jenkins X environments?

  • jx get env
  • jx fetch env

Module: Importing Existing Projects Into Jenkins X

1. Which simple command lets us import projects into Jenkins X?

  • jx add
  • jx create project
  • jx boot
  • jx import

2. Which one of the following is not a branch created by Jenkins X for the project?

  • master
  • develop
  • Stable
  • PR-.*

3. Which flag do we use with jx get activities that lets us continuously observe the progress?

  • —loop
  • —watch
  • —repeat
  • —run

4. How did we add the MongoDB chart to the one that we already had?

  • We created a requirements.yaml file and added the MongoDB in dependencies.
  • We added the MongoDB dependency in the deployments.yaml file.

5. When your project has some of the files, but not all, the import process will generate only those that are missing.

  • True
  • False

Module: Creating Custom Build Packs

1. Which one of the following statements is a best practice regarding custom build packs?

  • The custom build packs that we create should contemplate all the variations present in our applications.
  • The custom build packs should provide the things that are repeatable across projects.

2. For creating a custom build pack, in most cases, all we have to do is find the one that is closest to our needs, make a copy, and change a few files.

  • True
  • False

3. Why did we use the probePath value / instead of /demo/hello?health=true in our custom build pack?

  • We changed the default path for health checks in the project.
  • It is highly unlikely that a similar application from a different team will use the same path for health checks.

4. What is the purpose of the following commands?

   kubectl --namespace jx delete act \     --selector owner=$GH_USER \     --selector sourcerepository=go-demo-6
  • It will remove all the Jenkins X activities related to go-demo-6.
  • It will delete the go-demo-6 application from Jenkins X.

5. Which of the following is a valid reason not to contribute your custom build pack to the community?

  • The build pack is too specific for your company and that it would not be useful to others.
  • The policy of your company does not permit you to make public anything done during your working hours, or if your build pack contains proprietary information.

Module: Applying GitOps Principles

1. GitOps is a way to do Continuous Delivery which assumes that Git is a single source of truth and changes to infrastructure or applications are made by pushing changes to Git, not by clicking buttons.

  • True
  • False

2. Which ones of the following are not GitOps commandments? (contains multiple correct options)

  • All deployments must be idempotent.
  • All binaries must be stored in registries.
  • Communication between processes must be parallel
  • Everything must be tracked, actions should be reproducible, and idempotent.
  • Processes should run for as long as possible.

3. What are Permanent environments?

  • The environments where the action (building, testing, etc.) is happening.
  • Permanent environments are those where our releases should run indefinitely.
  • 4. In the environments with promotion set to the new releases will not be deployed through a pipeline. Instead, we’ll need to decide which release will be deployed to production and when that should happen.
  • True
  • False

5. What does the following command do?

         jx get env --promote Auto
  • It sets promotion for each environment to Auto.
  • It outputs the environments which has promotion set to Auto.

6. What is the purpose of application-specific tests?

  • Their goal is to validate whether the system works as a whole.
  • Their goal is to check that the features of an application behave as expected.

7. Unit tests fall under the ____________ category.

  • Static validation
  • Application-specific tests
  • System-wide validation

8. What is the role of the development environment?

  • The development environment is where all the applications are promoted automatically whenever we push a change to the master branch.
  • The development environment runs the tools we need for continuous delivery as well as temporary Pods used during builds.

Module: Improving And Simplifying Software Development

1. Jenkins X allows us to create a project-based private development environment with all the tools, configurations, and environment variables we might need to work on any of our applications. That feature is called _________.

  • GitOps
  • DevPod

2. What does the following command do?

      jx rsh --devpod
  • Creates a new DevPod.
  • Opens a terminal inside a Pod and connects to the DevPod we just created.

3. The watcher inside the DevPod builds and deploys releases to a dedicated Namespace every time a file changes.

  • True
  • False

4. The main sections of skaffold.yaml define the following:

  • load
  • build
  • Test
  • Deploy

5. What do we use to synchronize local files with those in the container that forms the DevPod?

  • rsync
  • ksync

6. By default Jenkins X provides the following browser-based IDE.

  • VS Code
  • IntelliJ
  • Vim

Module: Working With Pull Requests And Preview Environments

1. How can we create a PR titled “My PR” using the jx CLI?

jx create "My PR" 
jx create PR “My PR" 
jx create pullrequest --title "My PR" 
jx create PR --title "My PR" 

2. If we push additional changes to the pull request, the process will repeat, and it will end with new deployment to a different environment.

  • True
  • False

3. Can you merge a PR using the jx CLI?

  • Yes
  • No

4. In CronJobs, by default, the garbage collectors are executed every __________.

  • thirty minutes
  • three hours
  • six hours
  • day

5. Can you run the garbage collectors manually?

  • Yes
  • No

Module: Promoting Releases To Production

1. Promotion to production is a technical decision.

  • True
  • False

2. Who usually decides when to promote a release to production?

  • Product manager and Team lead
  • Business and Marketing management

3. Can we add integration tests when promoting a release?

  • Yes
  • No

4. The -—env flag given to jx promote represents the environment that we want to promote.

  • True
  • False

5. The —version the flag represents the version of the application that we want to promote.

  • True
  • False

6. To improve deployments to production, we can add a HorizontalPodAutoscaler that will scale the application depending on memory and CPU consumption or based on custom metrics.

  • True
  • False

Module: Versioning Releases

1. In semantic versioning, the PATCH is incremented when _________________________.

  • changes are not backward compatible
  • we release bug fixes
  • new functionality is added in a backward-compatible manner

2. When creating a dummy tag to bump the patch version, we can bump the release version to v1.0.0.

  • False
  • True

3. What does jx-release-version do?

  • Returns a new release version based on previous git tags that can be used in a new release.
  • It returns the current release version based on the current git tags.

4. We can use the VERSION variable in the projects Makefile to control the versioning of releases.

  • True
  • False

5. Which version control method is better?

  • Versioning through tags
  • Versioning through Jenkins X pipeline

6. Can we implement a custom versioning logic in the project’s Makefile?

  • Yes
  • No

Module: Implementing ChatOps

1. Which element of the ChatOps process is Prow responsible for?

  • Communication
  • Permissions
  • Notifications
  • Actions

2. Lighthouse is an alternative to Prow.

  • Yes
  • No

3. What is the purpose of the tide activity in the checks.

  • It is responsible for executing the part of the pipeline dedicated to pull requests.
  • It is in charge of merging the pull request to the master branch, and it is configured to do so only after we send it the slash command to do so.

4. In Jenkins X implementation, the /approve command approves a PR while the /lgtm command provides a label that is used to gate merging.

  • True
  • False

5. The size label is assigned by the Prow plugin and it depends on the number of lines changed.Your Answer

  • True
  • False

6. Can you approve your own PR using the /approve command?

  • Yes
  • No

7. Can we add additional Prow plugins that can modify the rules that govern the pull request process?

  • Yes
  • No

Module: Using The Pipeline Extension Model

1. What was the main disadvantage of the “Freestyle jobs” in traditional Jenkins?

  • There was no way to describe them in code, and they were not kept in version control.
  • It was a huge jump for some Jenkins users who had been accomplishing results by clicking and selecting options, but without knowing how to write code.

2. The static flavor reduced the role of the “traditional” Jenkins, while the serverless eradicated it.

  • True
  • False

3. Static Jenkins X is for all those who seek the full power of Kubernetes and want to be genuinely cloud-native.

  • True
  • False

4. Which of the following is an effective way of reducing repetition while using Jenkinsfile?

  • Shared Groovy libraries
  • Executables
  • Plugins

5. Which of the following is not a pipeline type that is defined in pipeline.yaml?

  • pullrequest
  • merge
  • release
  • feature

6. What is the purpose of the postbuild lifecycle of a pipeline?

  • It executes the process of installing the release to one or more environments.
  • It builds the binaries and other artifacts.
  • It is usually used for additional validations like security scanning.
  • It prepares the environment for the build steps.

7. The preSteps mode will add a new step before those in the lifecycle inherited from the build pack.

  • True
  • False

8. If we want to run the command: echo “This is top secret!”, after the build is executed the pipeline should be:

env:
- name: DEPLOY_NAMESPACE
  value: jx-staging
pipelineConfig:
  env:
  - name: DEPLOY_NAMESPACE
    value: jx-staging
  pipelines:
    release:
      build:
        steps:
        - command: echo "This is top secret!"
env:
- name: DEPLOY_NAMESPACE
  value: jx-staging
pipelineConfig:
  env:
  - name: DEPLOY_NAMESPACE
    value: jx-staging
  pipelines:
    release:
      preBuild:
        steps:
        - command: echo "This is top secret!"
env:
- name: DEPLOY_NAMESPACE
  value: jx-staging
pipelineConfig:
  env:
  - name: DEPLOY_NAMESPACE
    value: jx-staging
  pipelines:
    release:
      postBuild:
        steps:
        - command: echo "This is top secret!"

Module: Upgrading Jenkins X Components

1. Upgrading Jenkins X Components

  • Yes
  • No

2. How does apply smaller changes more frequently gives us more control? (Multiple correct options)Selected Option

  • It allows us to find issues faster.
  • It can not cause breaking changes.Not Selected
  • It makes it easier for us to fix the issues.

3. What are the preferred strategies for upgrading Jenkins X? (Multiple correct options)

  • Upgrade Jenkins X blindly.
  • Run a test instance in parallel with production (e.g., in separate Namespaces).
  • Have a test cluster.

4. Backing up your cluster will help in the worst-case scenario and you will be able to restore the last known working state.

  • True
  • False

5. Which of the following task can be done using jx upgrade ingress?

We can change the domain of the cluster or a namespace.

We can add TLS certificates to all Ingress endpoints.

We can change the template Jenkins X is using to auto-generate addresses of applications.

Get More Answers

Google Cloud Professional Data Engineer: Get Certified 2021 | Exam Dumps

Google Cloud Platform Big Data and Machine Learning Fundamentals | Quiz Answers

Enroll in This Course

Leave a Reply