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.0
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.yaml
file in a text editor.infoThe
spacetech
in the example codes below are example project name.Please find your own project name and replace
spacetech
with your project name.To see projects, you can check the
projects
directory.ls -l ./projects
vi ./projects/spacetech/global.yaml
-
Create or update the
networkSettings
entry in theglobal.yaml
configuration file.cautionIf the
networkSettings
entry already exists in yourglobal.yaml
file, ensure you update the existing key instead of creating a new one.networkSettings:
enabled: true
networkSubnet: 10.0.0.0/16tipThe
networkSubnet
will 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" up
tipYou 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.yaml
file in a text editor.infoThe
spacetech
in the example codes below are example project name.Please find your own project name and replace
spacetech
with your project name.To see projects, you can check the
projects
directory.ls -l ./projects
vi ./projects/spacetech/global.yaml
-
Create or update the
dmzNetworkSettings
entry in theglobal.yaml
configuration file.cautionIf the
dmzNetworkSettings
entry already exists in yourglobal.yaml
file, ensure you update the existing key instead of creating a new one.dmzNetworkSettings:
enabled: true
networkSubnet: 10.0.0.0/16tipThe
networkSubnet
will 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.gz
file to the Appcircle DMZ server with a file transfer protocol likescp
orftp
. -
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.gz
file 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
enabled
parameter tofalse
or delete thenetworkSettings
ordmzNetworkSettings
entry 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.