Manage & Deploy Applications
Learn how to easily manage and deploy applications on your ALPON X4 micro-edge computer using the Sixfab Connect platform.
This guide provides a simple way to manage and run applications on the ALPON X4 micro-edge computer. The ALPON X4 uses the Sixfab Connect cloud platform to make working with apps easy. It supports container-based applications, helping users keep their apps running smoothly and without much effort.
It provides step-by-step instructions for deploying containers in two ways: directly pulling from Docker Hub and using Sixfab’s own container registry. While Docker Hub offers a quick and simple way to get started with pre-existing images, the Sixfab Registry provides users with the flexibility to customize and control their applications fully. If your use case requires tailored functionality or specific configurations, deploying a custom image is the recommended approach.
Getting Started with Application Deployment
The ALPON X4 leverages container-based application deployment to offer users a robust, scalable, and efficient environment. Containers allow apps to run in isolated environments, reducing conflicts and ensuring better resource utilization.
Supported Architectures: ALPON X4 is built on an ARM64 architecture. Ensure that all images deployed on the device are compatible with this architecture. Pre-built ARM64 images are readily available on Docker Hub and can be used for quick deployments.
Two Deployment Methods:
- Quick Start: Directly pulling images from Docker Hub.
- Advanced Customization: Create and upload your own custom images to Sixfab Registry for personalized solutions.
Why Choose One Method Over the Other?
Pulling from Docker Hub is like using a ready-made app—quick and easy but limited to what’s already available. Deploying a custom image via the Sixfab Registry, however, is ideal for users who need specific features or want to modify existing applications. For instance, if you require a web server with preloaded custom pages or a preconfigured database, building and deploying your custom image is the best option. This method offers greater control and customization for your applications.
Deploying a Container from Docker Hub
This method allows users to pull ARM64-compatible images directly from Docker Hub and deploy them on ALPON X4 without additional configuration. Learn how to quickly run your first container on ALPON X4 using an example container. Follow these steps to deploy your first container:
Step 1: Navigate to the Applications Tab
- Log in to the Sixfab Connect platform.
- Select your registered ALPON X4 device under the "Assets" section.
- Click on the "Applications" tab.
- Select the "+ Deploy" button to start creating a new container.
Step 2: Configure Container Settings
Container name: Assign a descriptive name to your application (e.g., MyNginxApp).
Image: Since the registry is initially empty, use the option to specify a pre-configured custom container path:
- Check the box labeled "I would like to use my own container path".
- Enter the container path (e.g.,
nginx:latest
).
This will pull the official nginx image directly from Docker Hub.
Note
Only ARM64-compatible images can run on the ALPON X4. Ensure the selected image is built for ARM64. Most official images on Docker Hub, such as nginx, redis, and mysql, offer ARM64 versions.
Environments: Add variables here to set them as environment variables inside the container (e.g., DATABASE_URL: my-database-url
). These variables can configure the container's behavior dynamically.
Ports: Map external ports on ALPON X4 to internal ports in the container.
- Example: Map external port 30800 to internal port 80 for web traffic. This allows access to the app through port 30800.
- Valid Range: Only ports between 30000-32767 can be mapped.
Volumes: Bind directories or files from ALPON X4 to the container. This is useful for persistent data storage. This allows file interactions without restarting the container. Learn more about Docker volumes.
Host Network: Allows the container to use the host device's network system instead of its own. This is suitable for applications requiring direct access to the host's network interface. Learn more about Docker networking.
Privileged: Grants the container root access to all devices on the host system. Use this option carefully as it poses security risks. Learn more about privileged containers.
Step 3: Deploy Container
- Before clicking “+ Deploy” review the setup to ensure that all fields are filled in correctly. The screen should look like this:
- Click "+ Deploy" to launch the container.
Once deployed, the app will be accessible via the mapped port (e.g.,http://[Device_IP]:30800
).
Deploying a Custom Image via Sixfab Registry
For advanced use cases, you can create custom container images and push them to the Sixfab Registry for deployment. Follow these steps:
Step 1: Prepare Your Image
To push an image to the Sixfab registry, ensure that Docker and Docker Buildx are installed on your personal computer.
Install Docker
- Windows and Mac:
Download Docker Desktop from the official Docker website and follow the installation instructions.
Docker Desktop includes Docker Buildx by default, so no separate installation is required.
- Linux:
Follow the installation guide for your distribution from the Docker documentation. Once Docker is installed, ensure Docker Buildx is enabled with the command:
docker buildx create --use
- Install Docker Buildx (if needed):
Docker Buildx is included by default in Docker Desktop for Windows and Mac.
For Linux, you can verify Buildx installation with:
docker buildx version
For more details, please refer to the official Docker installation documentation.
Create a Dockerfile:
- Create a file named Dockerfile. Example Dockerfile for testing:
FROM nginx:stable-alpine
RUN echo "Test successful, actively running." > /usr/share/nginx/html/index.html
- The Dockerfile is edited by developers. For the Docker image to run on ALPON X4, it must be configured to be compatible with the ARM64 architecture.
Verify that your container image supports ARM64 by using the--platform linux/arm64
flag during the build process.
Build the Image:
Open the terminal and navigate to the directory containing the Dockerfile. Run the following command to build the image:
docker buildx build --platform linux/arm64 -t first-app:latest ./
Step 2: Push the Image to Sixfab Registry
Access the Sixfab Registry:
Log in to the Sixfab Connect platform, navigate to the Sixfab Registry page, and locate your username at the top of the page.
Set Your Registry Password:
If you have not yet set your registry password, click "Reset Password" on the Sixfab Registry page. Follow the on-screen instructions to set a new password.
Note
The password will only be displayed once, so save it securely.
Login to registry:
Open a terminal on your personal machine and log in to the Sixfab Registry using the following command:
docker login cr.sixfab.io --username [your_username]
Enter the registry password when prompted. Once logged in, proceed to push your Docker image.
Ensure the Image Exists:
Check if the image exists by using the following command:
docker images
This command will return a list of your local Docker images. Look for the first-app:latest\
in the list.
Tag the image:
Tag the image with the registry URL. Replace [your_username]
with your Sixfab Registry username.
docker tag first-app:latest cr.sixfab.io/[your_username]/first-app:latest
Push the image:
Use the following command to push your image to the Sixfab Registry:
docker push cr.sixfab.io/[your_username]/first-app:latest
Verify the Image in the Registry:
Once the push is complete, refresh the page and check if the image appears in the Sixfab Registry page on the platform. This ensures the image is ready for deployment.
Step 3: Deploy Container
Navigate to the Apps Tab
Go to the Apps tab on your Sixfab Connect dashboard and click on "+ Deploy".
Fill in the Details
- Container Name: Provide a name for your container.
- Image: Select the image you just uploaded to the Sixfab Registry.
- Assign a Port: To avoid conflicts, assign a unique port for the application.
For example, if port 30800 is in use by another app, assign port 30900 for this one. - Review and Confirm: Double-check the setup. The configuration screen should look similar to the provided example.
- Deploy: Click on "+ Deploy" to launch the container on the ALPON X4 device.
Once deployed, access the container through the assigned port (e.g., port 30900) using one of the methods described under Access to the Container.
Access to the Container
Access from Local Network
Get the IP Address: Find your device’s IP address on the local network.
Access via Browser:
- Make sure your computer is connected to the same network as ALPON X4.
- In your computer's web browser, type
http://[Device_IP]:30800
, replacing[Device_IP]
with the actual IP address of your device. - If set up correctly, you should see the nginx welcome page.
Access Outside the Local Network via Remote Terminal
- If your device is not on the local network, go to the "Device" tab on the platform and click "Open Remote Terminal".
- In the terminal, enter the following command to check the container's status:
curl http://127.0.0.1:30800
- If the container is running successfully, the output should look like the following:
Access via Monitor Connected to Device
- Connect a monitor to the ALPON X4 device. Open a web browser on the device and navigate to
http://127.0.0.1:30800
. This will allow you to access the container interface directly from the device.
Manage Containers
Once deployed, containers can be monitored and controlled directly from the cloud platform. Users can:
- View Status to check container performance.
- Open a remote terminal directly inside the container for direct command-line access
- Run, Pause, Restart, or Delete containers as needed.
- Edit Deployments to change settings or update images.
These steps ensure efficient management of applications on ALPON X4, minimizing effort.
Updated 4 days ago