nerdexam
Cisco

300-910 · Question #104

An application development project has these requirements: deployment via a container image image building as part of a CI/CD pipeline test in dev and stage environments How must the development team

The correct answer is C. Store the configuration in environment variables.. According to the Twelve-Factor App methodology, configuration that varies between deployments (like dev and stage environments) should be stored in environment variables to keep it separate from the codebase.

Application Deployment and Operations

Question

An application development project has these requirements:
  • deployment via a container image
  • image building as part of a CI/CD pipeline
  • test in dev and stage environments
How must the development team manage the configuration according to the twelve-factor app?

Exhibit

300-910 question #104 exhibit

Options

  • AUse the configuration in files that are not checked into revision control.
  • BStore the configuration as constants in the code.
  • CStore the configuration in environment variables.
  • DBatch the configuration into named groups (dev, stage, prod).

How the community answered

(46 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    91% (42)
  • D
    2% (1)

Why each option

According to the Twelve-Factor App methodology, configuration that varies between deployments (like dev and stage environments) should be stored in environment variables to keep it separate from the codebase.

AUse the configuration in files that are not checked into revision control.

Storing configuration in files not checked into revision control can lead to inconsistencies, make deployments less reproducible, and complicate audits, contradicting principles of consistent and manageable deployments.

BStore the configuration as constants in the code.

Storing configuration as constants in the code tightly couples the configuration to the application, requiring code changes and a new build for every configuration modification across environments, which is against the Twelve-Factor App principles.

CStore the configuration in environment variables.Correct

The Twelve-Factor App methodology mandates that configuration, which includes anything that varies between deployments (e.g., database credentials, external service handles), should be strictly separated from the code. Storing configuration in environment variables ensures that the same code base can be deployed across multiple environments (development, staging, production) with different configurations, without code changes or recompilation, aligning with principles for containerized deployments and CI/CD.

DBatch the configuration into named groups (dev, stage, prod).

While configuration might logically exist for different environments (dev, stage, prod), the Twelve-Factor App specifies *how* that configuration should be exposed to the application, advocating environment variables rather than specific file structures or grouping mechanisms within the codebase.

Concept tested: Twelve-Factor App - config management (Env Vars)

Source: https://12factor.net/config

Topics

#Twelve-Factor App#Configuration Management#Environment Variables#Containerization

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice