@Test public void shouldRunBootstrapThroughSshAndSendFiles() throws Exception { NodeBootstrapper bootstrapper = new NodeBootstrapper(node); bootstrapper.bootstrapNode(); verify(nodeSetup).setup(); verify(scp).sendFile(initialNodeJsonPath, NodeBootstrapper.CHEF_SOLO_FOLDER); verify(scp).sendFile(prepareDeploymentScriptPath, NodeBootstrapper.CHEF_SOLO_FOLDER); }
public void bootstrapNode() throws NodeNotAccessibleException, NodeNotBootstrappedException { logger.info("Bootstrapping " + this.node.getIp()); executeBootstrapCommand(); saveFile(PREPARE_DEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(PREPARE_UNDEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(ADD_RECIPE_SCRIPT, CHEF_SOLO_FOLDER); saveFile(REMOVE_RECIPE_FROM_NODE, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER + "/node.json.backup"); if (usingQoSManagement) { setUpHarakiri(); setUpMonitoring(); } logger.info("Bootstrap completed at " + this.node); }
NodeBootstrapper { public void bootstrapNode() throws NodeNotAccessibleException, NodeNotBootstrappedException { logger.info("Bootstrapping " + this.node.getIp()); executeBootstrapCommand(); saveFile(PREPARE_DEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(PREPARE_UNDEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(ADD_RECIPE_SCRIPT, CHEF_SOLO_FOLDER); saveFile(REMOVE_RECIPE_FROM_NODE, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER + "/node.json.backup"); if (usingQoSManagement) { setUpHarakiri(); setUpMonitoring(); } logger.info("Bootstrap completed at " + this.node); } }
NodeBootstrapper { public void bootstrapNode() throws NodeNotAccessibleException, NodeNotBootstrappedException { logger.info("Bootstrapping " + this.node.getIp()); executeBootstrapCommand(); saveFile(PREPARE_DEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(PREPARE_UNDEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(ADD_RECIPE_SCRIPT, CHEF_SOLO_FOLDER); saveFile(REMOVE_RECIPE_FROM_NODE, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER + "/node.json.backup"); if (usingQoSManagement) { setUpHarakiri(); setUpMonitoring(); } logger.info("Bootstrap completed at " + this.node); } NodeBootstrapper(CloudNode node); }
NodeBootstrapper { public void bootstrapNode() throws NodeNotAccessibleException, NodeNotBootstrappedException { logger.info("Bootstrapping " + this.node.getIp()); executeBootstrapCommand(); saveFile(PREPARE_DEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(PREPARE_UNDEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(ADD_RECIPE_SCRIPT, CHEF_SOLO_FOLDER); saveFile(REMOVE_RECIPE_FROM_NODE, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER + "/node.json.backup"); if (usingQoSManagement) { setUpHarakiri(); setUpMonitoring(); } logger.info("Bootstrap completed at " + this.node); } NodeBootstrapper(CloudNode node); void bootstrapNode(); }
NodeBootstrapper { public void bootstrapNode() throws NodeNotAccessibleException, NodeNotBootstrappedException { logger.info("Bootstrapping " + this.node.getIp()); executeBootstrapCommand(); saveFile(PREPARE_DEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(PREPARE_UNDEPLOYMENT_SCRIPT, CHEF_SOLO_FOLDER); saveFile(ADD_RECIPE_SCRIPT, CHEF_SOLO_FOLDER); saveFile(REMOVE_RECIPE_FROM_NODE, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER); saveFile(INITIAL_NODE_JSON, CHEF_SOLO_FOLDER + "/node.json.backup"); if (usingQoSManagement) { setUpHarakiri(); setUpMonitoring(); } logger.info("Bootstrap completed at " + this.node); } NodeBootstrapper(CloudNode node); void bootstrapNode(); static final String BOOTSTRAP_SCRIPT; static final String SETUP_HARAKIRI_SCRIPT; static final String SETUP_MONITORING_SCRIPT; static final String INITIAL_NODE_JSON; static final String PREPARE_DEPLOYMENT_SCRIPT; static final String PREPARE_UNDEPLOYMENT_SCRIPT; static final String ADD_RECIPE_SCRIPT; static final String REMOVE_RECIPE_FROM_NODE; static final String CHEF_SOLO_FOLDER; }