deploy

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package deploy provides functions for building out nodes and test networks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNodes

func AddNodes(tn *testnet.TestNet) error

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

func Build(tn *testnet.TestNet, services []util.Service) error

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 BuildNode

func BuildNode(tn *testnet.TestNet, server *db.Server, absNum int, relNum int)

BuildNode builds out a single node in a testnet

func Destroy

func Destroy(tn *testnet.TestNet) error

Destroy is an alias of PurgeTestNetwork

func DockerKill

func DockerKill(client *ssh.Client, node int) error

DockerKill kills a single node by index on a server

func DockerKillAll

func DockerKillAll(client *ssh.Client) error

DockerKillAll kills all nodes on a server

func DockerLogin

func DockerLogin(client *ssh.Client, username string, password string) error

DockerLogin is an abstraction of docker login

func DockerLogout

func DockerLogout(client *ssh.Client) error

DockerLogout is an abstraction of docker logout

func DockerNetworkCreate

func DockerNetworkCreate(tn *testnet.TestNet, serverID int, subnetID int, node int) error

DockerNetworkCreate creates a docker network for a node

func DockerNetworkDestroy

func DockerNetworkDestroy(client *ssh.Client, node int) error

DockerNetworkDestroy tears down a single docker network

func DockerNetworkDestroyAll

func DockerNetworkDestroyAll(client *ssh.Client) error

DockerNetworkDestroyAll removes all whiteblock networks on a node

func DockerPull

func DockerPull(clients []*ssh.Client, image string) error

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

func DockerStartServices(tn *testnet.TestNet, services []util.Service) error

DockerStartServices creates the service network and starts all the services on a server

func DockerStopServices

func DockerStopServices(tn *testnet.TestNet) error

DockerStopServices stops all services and remove the service network from a server

func PurgeTestNetwork

func PurgeTestNetwork(tn *testnet.TestNet) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL