Cloud Automation and Orchestration
Cloud Automation and Orchestration tests how you provision and configure cloud infrastructure repeatably. Expect automation interfaces, infrastructure-as-code tooling, Junos automation features, and the distinction between automating one task and orchestrating a workflow across systems.
Automation versus orchestration
Automation executes a task, such as pushing a configuration. Orchestration coordinates multiple systems into a workflow, such as creating a VPC, launching a vSRX, configuring policy, and registering the service. Declarative tools describe the desired end state; imperative tools describe steps. Idempotency means repeated runs converge to the same state without duplicating resources.
Interfaces and tools
Junos supports NETCONF/YANG, REST APIs, and JET interfaces. PyEZ is a Python library for Junos automation. Ansible provides idempotent modules for configuration and orchestration. Terraform is declarative infrastructure-as-code for provisioning cloud resources and can track state. Contrail and Apstra expose APIs and controllers for orchestration. Junos also has commit, op, and event scripts, plus commit confirmed for safe rollback.
Worked example
You must provision a vSRX in AWS identically in development and production, including VPC, subnets, security groups, and Junos policy. Use Terraform to create the VPC, subnet, security group, and vSRX instance because it manages cloud resources declaratively and tracks state. Use Ansible with Junos modules or PyEZ over NETCONF to push zones and security policies. Store both in Git, run terraform plan before apply, and validate with a configuration check. Terraform should not be used to push CLI configuration to Junos; it provisions infrastructure, while Ansible or PyEZ configures the device.
Traps that cost marks
Do not call Terraform a device configuration-management tool. Do not assume a playbook is idempotent unless its modules are. Do not confuse NETCONF with REST; both are APIs but use different models and transports. Do not ignore YANG model differences across Junos versions. Do not make uncommitted or unvalidated changes-use commit checks and commit confirmed. Do not treat orchestration as a synonym for a single script.
Key points
- Automation runs a task; orchestration coordinates a multi-system workflow.
- Declarative tools describe desired state; idempotent runs converge without duplication.
- Terraform provisions cloud infrastructure; Ansible or PyEZ configures Junos devices.
- Junos automation interfaces include NETCONF/YANG, REST, JET, PyEZ, and commit/op/event scripts.
- Commit confirmed provides automatic rollback if a change is not confirmed.