Module: What is Jenkins X?
1. Can we install Jenkins X in an existing Kubernetes Cluster?
2. Can you practice Jenkins X locally using Minikube or Docker Desktop?
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?
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.
2. What is the purpose of the
- 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
- 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
2. Which one of the following is not a branch created by Jenkins X for the project?
3. Which flag do we use with
jx get activities that lets us continuously observe the progress?
4. How did we add the MongoDB chart to the one that we already had?
- We created a
requirements.yamlfile and added the MongoDB in
- We added the MongoDB dependency in the
5. When your project has some of the files, but not all, the import process will generate only those that are missing.
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.
3. Why did we use the
/ 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.
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
- The environments where the action (building, testing, etc.) is happening.
Permanentenvironments 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.
5. What does the following command do?
jx get env --promote Auto
- It sets promotion for each environment to
- It outputs the environments which has promotion set to
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
developmentenvironment is where all the applications are promoted automatically whenever we push a change to the master branch.
developmentenvironment 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 _________.
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.
4. The main sections of
skaffold.yaml define the following:
5. What do we use to synchronize local files with those in the container that forms the DevPod?
6. By default Jenkins X provides the following browser-based IDE.
- VS Code
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.
3. Can you merge a PR using the
4. In CronJobs, by default, the garbage collectors are executed every __________.
- thirty minutes
- three hours
- six hours
5. Can you run the garbage collectors manually?
Module: Promoting Releases To Production
1. Promotion to production is a technical decision.
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?
-—env flag given to
jx promote represents the environment that we want to promote.
—version the flag represents the version of the application that we want to promote.
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.
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
3. What does
- 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.
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
Module: Implementing ChatOps
1. Which element of the ChatOps process is Prow responsible for?
2. Lighthouse is an alternative to Prow.
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.
size label is assigned by the Prow plugin and it depends on the number of lines changed.Your Answer
6. Can you approve your own PR using the
7. Can we add additional Prow plugins that can modify the rules that govern the pull request process?
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.
3. Static Jenkins X is for all those who seek the full power of Kubernetes and want to be genuinely cloud-native.
4. Which of the following is an effective way of reducing repetition while using
- Shared Groovy libraries
5. Which of the following is not a pipeline type that is defined in
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.
preSteps mode will add a new step before those in the lifecycle inherited from the build pack.
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!"
- name: DEPLOY_NAMESPACE
- name: DEPLOY_NAMESPACE
- 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
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.
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