Configuring the Web Console

By default, navigating to the root name of an Apcera cluster (for example, your-cluster.domain.io) returns a page not found error. You can change this behavior so that users are redirected to the cluster's web console (console.your-cluster.domain.io, for example) if they navigate to one or more routes you specify.

The following steps describe how to enforce that when a user requests the cluster's root URL they are redirected to the web console URL.

Note: In a standard Apcera installation the name of the web console job is lucid and is located in the /apcera namespace, as shown below.

Enforcing Routes on the Web Console

To enforce a route on the web console:

  1. Use the apc app update command to add an environment variable named ENFORCED_ROUTE to the lucid job whose value is the actual route to the cluster's web console. For example, the following sets ENFORCED_ROUTE=console.your-cluster.domain on the lucid job (completing this operation requires restarting the job):

     ~ apc app update lucid -e 'ENFORCED_ROUTE=console.your-cluster.domain.io' --namespace /apcera
     ╭─────────────────────────────────────────────────────────────────────────╮
     │                           Job Update Settings                           │
     ├───────────────────────┬─────────────────────────────────────────────────┤
     │                 Name: │ lucid                                           │
     │ Env Variables to Set: │ ENFORCED_ROUTE="console.your-cluster.domain.io" │
     ╰───────────────────────┴─────────────────────────────────────────────────╯
    
     Is this correct? [Y/n]:
     Update requires job restart
     Automatically restart and proceed? [Y/n]:
     Stopping job... done
     Setting 'ENFORCED_ROUTE="console.your-cluster.domain.io"'
     Applying update... done
     Starting job... done
     Waiting for the job to start...
     All instances started!
     Success!
    
  2. Use the apc route add command to add the route(s) you want to enforce. For example, the following adds the route your-cluster.domain.io to the lucid job:

     apc route add your-cluster.domain.io --app lucid --type http --port 0 --namespace /apcera
    

    In the same manner, add any other routes you would like to enforce (dashboard.your-cluster.domain.io, for example).

    When complete, try navigating to your-cluster.domain.io (or other route you added) in a browser; you should be redirected to console.your-cluster.domain.io.