It's easy to provision servers and manage containers across servers.
We will use s1 and s2 as example server names in this section
To add a server use the addserver command.
flockport addserver s1 [serverip]
This will connect to the server ip provided, generate certs, setup a secure connection and install Flockport
The s1 name is simply a server name for Flockport to refer to the server.
You can specify a user and ssh port when adding a server
flockport addserver s1 192.168.122.10 -u user -p sshport
s1 is the servername, 192.168.122.10. is the server IP. The '-u' flag specifies the user to connect to the server as and the '-p' flag specifies the ssh port. If not provided the default user is 'root' and the default port is 22
The servers needs to be a supported flockport distribution ie Xenial, Trusty, Jessie, CentOS 7 or Alpine Linux
Flockport will automatically detect the server os, verify if it is supported and install Flockport on the server. Once installed you can manage servers and containers across servers.
System level activity like adding networks and orchestration across servers requires root privileges so you need to have root privilges on the server
We strongly recommend using passwordless sudo accounts. Every Flockport action may require multiple steps and without a passwordless sudo automation becomes impossible and as you will get a password prompt for each action
To list added servers use the listservers command
This will show you all servers along with their IPs, user connected as and sshport.
You can set server parameters with the changeserver command
flockport changeserver s1 -p port -i IP
You can use the '-p' flag to change the server ssh port and the '-i' flag to change the server IP.
You can also get a summary of the server with the stats command.
flockport stats s1
This will show your stats on s1 server
You can also upgrade flockport installations on servers with the upgrade command
flockport upgrade s1
This will check if any upgrades are available and upgrade the flockport installation if required
You can push containers to servers and also pull containers from them
flockport push c1 s1
This pushes container c1 to server s1
To pull a container c2 from server s1
flockport pull s1:c1
This will pull container c1 from s1 server to your localhost
You can also push and pull container across servers
flockport push s1:c1 s2
This will push c1 container from server s1 to s2
Moving containers across servers is fast and seamless
You can run flockport commands on any added servers with the '-s' flag
flockport -s s1 ls
This will list all containers on the s1 server
flockport -s s1 ps
This will list all running containers on the s1 server
All flockport commands can be run via the '-s' flag
flockport -s s1 start c1
This start the c1 container on server s1
flockport -s s1 stop c1
This will stop the c1 container on server s1
A number of functions are available without the '-s' flag
flockport ls s1
This lists all containers on server s1
You can also run the command on multiple servers
flockport ls s1 s2
This will run the ls command on both s1 and s2
This also applies to commands like ps
flockport ps s1
You can also use a colon to specify server commands
flockport info s1:alpine
This will run the info command on the alpine container in s1
flockport start s1:alpine
This will start the alpine container on server s1
flockport stop s1:alpine
Just like containers you can tag and group servers. This allows you to perform actions on groups of servers. When tagging servers use the '-s' flag.
flockport tag -s s1 us-west db
This tags s1 with the us-west and db tag
You can also use groups. Tags let you apply multiple tags to a server while groups allows you to add a single tag to multiple servers.
flockport addgroup -s us-west s1 s2 s3
This add servers s1, s2 and s3 to the us-west group
You can perform group actions on tags or groups with the -'sg' flag
flockport -sg us-west ls
This list containers on all servers in the us-west group
A number of commands are available for use for group actions
You can update servers with the upgrade command
flockport update s1
This will update the Flockport installation on server s1 if required
You can update multiple server at once.
flockport update s1 s2 s3
This will update servers s1, s2 and s3
To update the local installation use the 'local' keyword
flockport update local
This will update the local flockport installation