Skip to content

Instantly share code, notes, and snippets.

@aepod
aepod / GSWP Lab Commands.md
Created December 7, 2018 15:25 — forked from josephoaks/GSWP Lab Commands.md
The Exercise Guide PDF does not copy and paste commands that are multi line very well...

Lab 2.2: Running commands

Task 1: Run local system commands

Step 1
  Steps for Windows:
    PS C:\> bolt command run 'net stop w32time' --nodes winrm://localhost --user Administrator --no-ssl --password
  
  Steps for Linux:
    $ bolt command run 'sudo systemctl stop ntpd' --nodes ssh://localhost --user centos --no-host-key-check

Task 2: Run remote system commands

#include <iostream>
#include <string>
#include <map>
using namespace std;
string province(string);
typedef map<string,string> , ProvinceList;
int main(){
string city, abbrev, prov;
delimiter ;;
drop procedure if exists build_catalog;;
create procedure build_catalog(IN categories INT, IN products INT)
begin
SET @category_count = 1;
SET @CATNAMEPREFIX = "Category ";
SET @CATURLKEYPREFIX = "cat-";
SET @CATURLPATHPREFIX = "catpath-";
SET @ROOTCATEGORY = 2;
SET @INCLUDEINMENU = 1;