Documentation ¶
Overview ¶
Package deploy provides functions for building out nodes and test networks
Index ¶
- func AddNodes(tn *testnet.TestNet) error
- func Build(tn *testnet.TestNet, services []util.Service) error
- func BuildNode(tn *testnet.TestNet, server *db.Server, absNum int, relNum int)
- func Destroy(tn *testnet.TestNet) error
- func DockerKill(client *ssh.Client, node int) error
- func DockerKillAll(client *ssh.Client) error
- func DockerLogin(client *ssh.Client, username string, password string) error
- func DockerLogout(client *ssh.Client) error
- func DockerNetworkCreate(tn *testnet.TestNet, serverID int, subnetID int, node int) error
- func DockerNetworkDestroy(client *ssh.Client, node int) error
- func DockerNetworkDestroyAll(client *ssh.Client) error
- func DockerPull(clients []*ssh.Client, image string) error
- func DockerRun(tn *testnet.TestNet, serverID int, subnetID int, resources util.Resources, ...) error
- func DockerStartServices(tn *testnet.TestNet, services []util.Service) error
- func DockerStopServices(tn *testnet.TestNet) error
- func PurgeTestNetwork(tn *testnet.TestNet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNodes ¶
AddNodes adds nodes to the network instead of building independently. Functions similarly to build, except that it does not destroy the previous network when building.
func Build ¶
Build builds out the given docker network infrastructure according to the given parameters, and return the given array of servers, with ips updated for the nodes added to that server
func DockerKill ¶
DockerKill kills a single node by index on a server
func DockerKillAll ¶
DockerKillAll kills all nodes on a server
func DockerLogin ¶
DockerLogin is an abstraction of docker login
func DockerLogout ¶
DockerLogout is an abstraction of docker logout
func DockerNetworkCreate ¶
DockerNetworkCreate creates a docker network for a node
func DockerNetworkDestroy ¶
DockerNetworkDestroy tears down a single docker network
func DockerNetworkDestroyAll ¶
DockerNetworkDestroyAll removes all whiteblock networks on a node
func DockerPull ¶
DockerPull pulls an image on all the given servers
func DockerRun ¶
func DockerRun(tn *testnet.TestNet, serverID int, subnetID int, resources util.Resources, node int, image string, env map[string]string) error
DockerRun starts a node
func DockerStartServices ¶
DockerStartServices creates the service network and starts all the services on a server
func DockerStopServices ¶
DockerStopServices stops all services and remove the service network from a server
func PurgeTestNetwork ¶
PurgeTestNetwork goes into each given ssh client and removes all the nodes and the networks. Increments the build state len(clients) * 2 times and sets it stag to tearing down network, if buildState is non nil.
Types ¶
This section is empty.