Configure Container Engine Network Subnet
Overview
This document explains how to configure your Appcircle server's and Appcircle DMZ server's network subnet of the containers if the existing subnet is conflicting with other networks or not suitable for your use case.
This feature is included in the Appcircle server package version 3.28.2 or later.
Configuring the Subnet for Appcircle Server
To configure the network subnet of the containers of the Appcircle server, follow these steps:
Be aware that this process will cause downtime since it requires a restart of the Appcircle server.
-
Log in to your Appcircle server via SSH or a remote connection.
-
Change to the directory containing the Appcircle server configuration.
cd appcircle-server -
Open the
global.yamlfile in a text editor.infoThe
spacetechin the example codes below are example project name.Please find your own project name and replace
spacetechwith your project name.To see projects, you can check the
projectsdirectory.ls -l ./projectsvi ./projects/spacetech/global.yaml -
Create or update the
networkSettingsentry in theglobal.yamlconfiguration file.cautionIf the
networkSettingsentry already exists in yourglobal.yamlfile, ensure you update the existing key instead of creating a new one.networkSettings:
enabled: true
networkSubnet: 10.0.0.0/16tipThe
networkSubnetwill be used to configure the network subnet of the Appcircle server containers. -
After saving the configuration changes, restart your Appcircle server to apply the new settings.
- Shutdown Appcircle server.
./ac-self-hosted.sh -n "spacetech" down- Apply configuration changes.
./ac-self-hosted.sh -n "spacetech" export- Boot Appcircle server.
./ac-self-hosted.sh -n "spacetech" uptipYou should check the status of the Appcircle server after boot for any possible errors.
./ac-self-hosted.sh -n "spacetech" check
Configuring the Subnet for Appcircle DMZ Server
To configure the network subnet of the containers of the DMZ server, follow these steps:
Be aware that this process will cause downtime since it requires a restart of the Appcircle DMZ server.
-
Log in to your Appcircle server via SSH or a remote connection.
-
Change to the directory containing the Appcircle server configuration.
cd appcircle-server -
Open the
global.yamlfile in a text editor.infoThe
spacetechin the example codes below are example project name.Please find your own project name and replace
spacetechwith your project name.To see projects, you can check the
projectsdirectory.ls -l ./projectsvi ./projects/spacetech/global.yaml -
Create or update the
dmzNetworkSettingsentry in theglobal.yamlconfiguration file.cautionIf the
dmzNetworkSettingsentry already exists in yourglobal.yamlfile, ensure you update the existing key instead of creating a new one.dmzNetworkSettings:
enabled: true
networkSubnet: 10.0.0.0/16tipThe
networkSubnetwill be used to configure the network subnet of the Appcircle DMZ server containers.infoAlthough the Appcircle server and Appcircle DMZ server have the same subnet configuration as the sample above, they are not required to have the same subnet values or to be configured to custom subnet both.
-
Apply the new configuration changes.
./ac-self-hosted.sh -n spacetech export --dmz -
Compress the Appcircle DMZ server directory into a tarball.
tar -czf dmz.tar.gz -C projects/spacetech/export/dmz/ . -
Transfer the
dmz.tar.gzfile to the Appcircle DMZ server with a file transfer protocol likescporftp. -
Log in to your Appcircle DMZ server via SSH or a remote connection.
-
Change to the directory containing the Appcircle DMZ server configuration.
cd appcircle-server-dmz -
Stop the Appcircle DMZ server.
./ac-self-hosted-dmz.sh down -
Delete the old Appcircle DMZ server directory.
cd .. && rm -rf appcircle-dmz-server -
Extract the
dmz.tar.gzfile into a new Appcircle DMZ server directory.mkdir -p appcircle-server-dmz && \
tar -xzf dmz.tar.gz -C appcircle-server-dmz -
Change directory into the new directory.
cd appcircle-server-dmz -
Reconfigure the Appcircle DMZ server.
./ac-self-hosted-dmz.sh -i -
Start the Appcircle DMZ server.
./ac-self-hosted-dmz.sh up -
Check the Appcircle DMZ server status.
./ac-self-hosted-dmz.sh check
Disabling Custom Subnet Configuration
To allow Docker or Podman to automatically manage subnet configurations for your Appcircle server and/or Appcircle DMZ server containers, you can disable the custom subnet settings.
To disable custom subnet configuration:
-
Follow the steps in either:
-
Set the
enabledparameter tofalseor delete thenetworkSettingsordmzNetworkSettingsentry in the appropriate configuration section:-
For the Appcircle server:
networkSettings:
enabled: false -
For the Appcircle DMZ server:
dmzNetworkSettings:
enabled: false
-
-
After saving the configuration changes, restart the Appcircle server and/or Appcircle DMZ server to apply the new settings by following the steps in the Configuring the Subnet for Appcircle Server or Configuring the Subnet for Appcircle DMZ Server section.
Need help?
Get help from Appcircle's support team, or see how others are using Appcircle by joining our Slack Channel.
