Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure cJunosEvolved on Docker

Read this topic to understand the connections and configurations of the cJunosEvolved instances deployment on KVM

Connect to cJunosEvolved

You can SSH to the cJunosEvolved from the Ubuntu host as shown in this section using the admin credentials:

The Management IP address is what was specified in for “eth0_mgmt” under the networks section for the specific container in the Docker Compose YAML file.

Each cJunosEvolved is configured for SSH access using the admin credentials. The admin password is “admin@123”.

Note:

You can set a root authentication plain-text password for cJunosEvolved if you prefer root access. This is done in the same way as for any JunosEvolved router. Also enable the SSH as root user if you prefer to login as root:

set system root-authentication plain-text-password <enter the password twice>

set system services ssh root-login allow

An alternative to ssh is to use the following command from the Host Server, to enter the CLI and configure the container. It is best to run this command after you have run “docker logs -f cevo1 command and seen the container (called cevo1 in this example) has reached login prompt.

# docker exec -ti cevo1 cli

root@cevo1>

Configure cJunosEvolved

There are multiple ways to configure cJunosEvolved:

Manual Configuration

You can connect to the EVO VM within the cJunosEvolved container through either ssh or the Docker command mentioned in the “Connect to cJunosEvolved” section and proceed to configure the container.

Disk Configuration

Specify a hierarchical Junos Evolved CLI configuration through the “volumes” stanza of the Docker Compose YAML file. In the example below:

There needs to be a valid hierarchical configuration file, called juniper.conf in a directory on your Host Server for the specific container, such as the below directory, for example: /root/cjunosevo/config/cevo1

cJunosEvolved software expects the juniper.conf file to be placed in its /home/evo/configdisk directory in the Linux side of the container. See below:

Automatic Configuration

Another option is to have cJunosEvolved auto configured through the CPTX_AUTO_CONFIG environment variable being set to 1 as previously described in this manual.

Note:

The autoconfigure option is a more minimal configuration tool than the Disk configuration. It is mutually exclusive with the Disk Configuration option and takes precedence over it.

Auto configuration does a startup configuration for cJunosEvolved based on extracting the information from the Docker Compose YAML file. Auto configuration can configure the following:

    1. The admin login credentials:
      • userid: admin
      • password: admin@123
    2. To enable ssh run the set system services ssh command.
    3. The default logging level is set as follows:

      set system syslog file interactive-commands interactive-commands any

      set system syslog file messages any notice

      set system syslog file messages authorization info

    4. The management IP of cJunosEvolved based on the value specified for “eth0_managment”
    5. The data interface “ipv4_address” values for interfaces starting from eth4 as specified in the Compose YAML file are configured in the startup configuration of the RE. The interface notation used in the CLI is automatically configured based on the environment variables indicating whether BX or BT, channelized or unchannelized notation should be used. See the WAN Interface tables in this manual for more details.

For example, in the case of a BX channelized cJunosEvolved being auto configured, if the Docker Compose YAML file has:

Then run the set interfaces et-0/0/0:0 unit 0 family inet address 100.1.1.2/24 command. This configuration will be set in the Routing Engine CLI.

In addition, depending on whether BX or BT, channelized or unchannelized, the corresponding general interface related configuration will be set in the Routing Engine CLI for all the data interfaces. The example below is for the first data interface (eth4) of a channelized BX:

set interfaces et-0/0/0 number-of-sub-ports 4

set interfaces et-0/0/0 speed 100g

Note:

If the “CPTX_AUTO_CONFIG: 1” environmental variable is set in the Docker Compose YAML file and no IPv4 address is specified for a data interface in the same file, cJunosEvolved will assign an IP address based on what Docker provides it. For example, if a subnet IP is specified for the corresponding data interface, Docker will assign an IP address from that subnet, and this will be configured in the cJunosEvolved Routing Engine CLI for the corresponding interface. The recommendation is to provide the IP address for each interface in the services section of the YAML file and a matching subnet IP address for that network in the “networks” section of the YAML file when using CPTX_AUTO_CONFIG, so you have control over the IP addresses.

How to Stop, Start, and Restart cJunosEvolved

Stop

The cJunosEvolved containers in a Docker Compose file can be stopped simultaneously in a graceful manner so its disk is preserved for the next restart. Run the stop command from the host server:

# docker compose -f <docker-compose-filename>.yaml stop -t <secs>

The -t option asks Docker Compose to wait the specified number of seconds, before it sends a SIGTERM to the container. The value of the timeout to specify, depends on various factors including the size of logs and configuration stored in the container and the disk speed of the host server. In testing, a -t value of 240 secs has been sufficient and usually it is less than 60 secs. Please benchmark this value for your use case as follows:

  • From the host server, start monitoring the EVO VM logs using the docker logs -f <container-name> command. This will print ongoing logs from EVO VM.
  • Issue the stop command with a larger -t value as follows:

    # docker compose -f <docker-compose-filename>.yaml stop -t 240

  • You will see the container logs as it is getting notified of the stop command and proceeds accordingly. For a successful shutdown, a message like below should be seen at the end of the logs:

    Fri Mar 28 22:40:14 UTC 2025: EVO VM shutdown successfully in [30secs]

Once cJunosEvolved is stopped, “docker container ls” will not show it but its networks are preserved for a future restart and can be seen as shown in the example below:

Verify that both the containers are stopped successfully using the docker logs command:

Start

Stopped containers can be started again using the docker compose start command.

For a fresh installation, use the docker compose up -d command as previously shown in this document.

The following example illustrates the docker compose start.

Restart

You can restart running containers, using the docker compose -f <docker-compose-file-name> restart -t 90 command.

Provide a “-t” you have benchmarked as previously mentioned in the stop section. A restart command is a stop and then a start command sequentially, so Docker Compose needs to be told how long to provide the container to stop gracefully to protect the container disk as mentioned in the Stop section above.

For example: