Bookmark this page

Quiz: The Red Hat OpenShift Build Process

The Red Hat OpenShift Build Process

Choose the correct answers to the following questions:


  1. 1.

    Which three of the following options are valid strategies for building a container image? (Choose three.)

    A

    Docker

    B

    Git

    C

    Source-to-Image

    D

    Custom

  2. 2.

    Which two of the following options are valid types of input sources for building a container image? (Choose two.)

    A

    Git

    B

    SVN

    C

    Filesystem

    D

    Containerfile

  3. 3.

    Given the BuildConfig in the below exhibit, which three of the following statements are true? (Choose three.)

    kind: BuildConfig
    apiVersion: build.openshift.io/v1
    metadata:
      name: "php-helloworld"
    spec:
      ...
      runPolicy: "Serial"
      source:
        git:
          uri: "http://services.lab.example.com/php-helloworld"
      strategy:
        sourceStrategy:
          from:
            kind: "ImageStreamTag"
            name: "php:7.0"
      output:
        to:
          kind: "ImageStreamTag"
          name: "php-helloworld:latest"
    A

    Multiple builds can run simultaneously.

    B

    After a successful build, the php-helloworld:latest container image is available for deployment.

    C

    The build uses a Git input source to create the final container image.

    D

    The BuildConfig uses the Docker strategy.

    E

    The BuildConfig uses the Source strategy.

  4. 4.

    A developer wants to build a PHP application using the Source strategy. Which of the following options sets the build configuration to use the S2I builder image for a PHP application?

    A

    Use the from attribute for the Source strategy.

    B

    Use the from attribute from the Image input source.

    C

    Use the from attribute from the Containerfile input source.

    D

    It is not required to configure the S2I builder image. During the build, the S2I process recognizes the source language and automatically selects a PHP builder image.

  5. 5.

    For the Docker strategy, which of the following options keeps the credentials from showing in the resulting image?

    A

    Adding a Containerfile instruction that removes the credentials after they are not needed for the build.

    B

    Using a Kubernetes secret to store the credentials. Then mounting the credentials secret with a volume property in the dockerStrategy section from the BuildConfig resource.

    C

    Using environment variables to store the credentials.

    D

    None of these.

  6. 6.

    Which of the following S2I scripts is responsible for building the application binaries in an S2I build?

    A

    run

    B

    assemble

    C

    save-artifacts

    D

    test/run

  7. 7.

    In which of the following directories (relative to the root of your source code) would you provide your own custom S2I scripts?

    A

    .scripts/bin

    B

    .s2i/bin

    C

    etc/bin

    D

    `usr/local/bin

  8. 8.

    Which two of the following scenarios are good candidates for incremental S2I builds? (Choose two.)

    A

    A Java EE application with many JAR dependencies managed by using Apache Maven.

    B

    An application that depends on an SQL database dump file that is invoked at application startup.

    C

    A Ruby web application that has many static assets such as images, CSS, and HTML files.

    D

    A Node.js application with dependencies managed by using npm.

Revision: do288-4.12-0d49506