One of the fastest ways to becoming a Cycle power user is embracing the two-way console.
This guide provides a few quick tips to assist in using this tool effectively. All sections assume the user is already logged into a two-way console (TWC) session.
Force Terminate All Sessions for An Instance
Although expiring connection credentials is straightforward, if it is necessary to immediately expire all active sessions for a given container instance, this can be done by stopping and restarting the container. This will force any active connections through the TWC to terminate.
Egress Networking For Package Installs
When a container has Public Network set to disable, any attempt to install packages via a package manager will fail. Changing the network setting to egress-only will enable outbound connections to package manager repositories, allowing packages to be installed in the running container. However, these packages will not persist across restarts, as container filesystems are stateless outside of stateful container volumes.
CLI's
Some software, such as SQL databases, often comes prepackaged with CLI tools. Using these tools to interact with a running container can be an efficient way to quickly retrieve configuration details and perform administrative tasks, such as creating database tables or deleting database users.
scenario
After starting a web service, if database calls are failing, the first step is to check the container's instance console for any error messages or relevant information.
The console reveals that a connection to that database has been denied for user@ip address. Using the twc combined with the already installed DB CLI tooling, an administrative change can be made to the user's remote connection privileges. After applying this change, the web service runs correctly!