Terminal
Zeet's Terminal feature allows you to connect to a running container and execute commands directly, providing a convenient way to troubleshoot and diagnose issues in real-time.
Getting Started
Before using the Terminal, ensure you have the following:
- An active Zeet account with a deployed project
- A Service Container or Job Container Project
- Familiarity with basic terminal commands and container concepts
When to Use the Terminal
The Terminal is particularly useful in scenarios such as:
- Inspecting logs, processes, mount points, environment variables, and package versions
- Making temporary modifications to the container for troubleshooting
- Performing quick checks and minor troubleshooting tasks
For more advanced debugging scenarios, consider using the Debug Terminal. Some specific scenarios where the Debug Terminal is recommended include:
- When your pod is crashing and you need a separate environment to investigate the issue
- When you're using a distroless container image that lacks debugging tools
- When you need to install packages or tools that are not present in your container image
Accessing the Terminal
To access the Terminal, follow these steps:
- Log in to your Zeet account.
- Navigate to the project you want to debug.
- Go to the Overview tab of the Project details page.
- Click on the "Terminal" button.
Using the Terminal
Once you've accessed the Terminal, you can start executing commands to inspect and troubleshoot your container. Here are some common use cases:
- Listing files and directories:
# List files in the current directory
$ ls -l
# List files in a specific directory
$ ls -l /path/to/directory
- Checking network connectivity:
# Ping a host
$ ping example.com
# Curl an endpoint
$ curl http://api.example.com/health
- Monitoring processes and resource usage:
# View running processes
$ top
# View running processes with a better interface
$ htop
- Editing configuration files:
# Edit a file with Vim
$ vim /path/to/config.yml
# Edit a file with Nano
$ nano /path/to/config.ini
Remember that any changes made during a Terminal session are temporary and will be lost when the container is restarted or redeployed. For permanent changes, update your container image and redeploy.
Best Practices
To effectively use the Terminal, keep these best practices in mind:
- Use the Terminal for quick checks and minor troubleshooting tasks.
- If you need more advanced debugging capabilities, consider using the Debug Terminal.
- Document any changes made during a Terminal session and incorporate them into your project's main branch to maintain consistency.