@@ -6,45 +6,47 @@ Service Now is a popular platform to report problems. This automation tracks the
66## Requirements
77
88- Apstra 4.2.0 or above
9- - python 3 or above
109
1110## Usage
1211
13121 . Prepare the PowerPack
1413- Apstra needs to have a Property Set that is used to manage the power pack.
15- - This can be auto-installed with Terraform or done manually:
16-
17- 1.1 Manual Apstra Setup
18- - Set up the management property set in Apstra with appropriate values:
19-
20- | Field | Purpose | Value/Example |
21- | ---| ---| ---|
22- | Name | PropertySet name | Ticket Manager |
23- | Input Type | Type of input required | Editor |
24- | Values | YAML of property values (including blueprints to manage) | (see below) |
25-
26- ``` yaml
27- blueprints : blueprint1, blueprint2
28- pause : false
29- ` ` `
30-
31- 1.2 Terraform/Tofu Apstra Setup
32- - Fill out apstra_snow_setup.sh
33- - % source apstra_snow_setup.sh
34- - % terraform init&&terraform apply
35- - This will set up a Property Set called Ticket Manager with all the blueprints in the environment.
36- - Inspect the Property Set and ensure that only the blueprints you want to track are in the list
14+ - Set up the management property set in Apstra with appropriate values:
15+
16+ | Field | Purpose | Value/Example |
17+ | ---| ---| ---|
18+ | Name | PropertySet name | Ticket Manager |
19+ | Input Type | Type of input required | Editor |
20+ | Values | YAML of property values (including blueprints to manage) | (see below) |
21+
22+ ``` yaml
23+ blueprint_ids : blueprint1, blueprint2
24+ pause : false
25+ ` ` `
3726
38272. Run PowerPack with Docker
39- - Copy setup.yaml.template to setup.yaml. Fill in the values as appropriate.
40- - Export the APSTRA_PASS and SNOW_PASS passwords.
41- - % docker build -t snowdemo:latest.
42- - At the end of this commend, you will get the id of the image that just got built use it in the next step.
43- - ` docker run -v $PWD/setup.yaml:/SnowApp/setup.yaml -e APSTRA_PASS=$APSTRA_PASS -e SNOW_PASS=$SNOW_PASS snowdemo:latest`
44-
45- 3. DEV-ONLY : Run PowerPack from Commandline
46- - ` pip3 install -r ./requirements.txt`
47- - copy setup.yaml.template to setup.yaml. Fill in the values as appropriate
48- - Export the APSTRA_PASS and SNOW_PASS passwords
49- - start the python script
50- ` python snow_tickets.py`
28+ - Create a setup.yaml, filling in the values as appropriate:
29+ ` ` ` yaml
30+ snow :
31+ instance : devxxxxx # Service Now Instance
32+ user : # Service Now Username. Account needs to have permissions to create and edit tickets
33+ wait_time_seconds : 20 # Time between checks
34+ tickets_property_set : tickets # Property Set for tickets
35+ management_property_set : Ticket Manager # Property Set to manage this automation
36+ # These are the
37+ #{
38+ # 'blueprint_ids': #Comma separated list of blueprint ids to be monitored
39+ # 'pause': #true or false. automation pauses if true
40+ # }
41+ ```
42+ - Set the following shell variables:
43+ | Variable | Example |
44+ | -------- | ------- |
45+ | APSTRA_URL | https://apstra.acme.net |
46+ | APSTRA_PORT | 4443 |
47+ | APSTRA_USER | service_account_user |
48+ | APSTRA_PASS | topSecretPW1# |
49+ | SNOW_PASS | snowPass%^3 |
50+ ```
51+ - Use the following command to run the container. The string `latest` can be replaced with the version you wish to use, like `v1.0.0`.
52+ - `docker run -v $PWD/setup.yaml:/SnowApp/setup.yaml -e APSTRA_URL=$APSTRA_URL -e APSTRA_PORT=$APSTRA_PORT -e APSTRA_USER=$APSTRA_USER -e APSTRA_PASS=$APSTRA_PASS -e SNOW_PASS=$SNOW_PASS snowdemo:latest`
0 commit comments