Skip to content
Snippets Groups Projects
Commit 231d1956 authored by Jason Colyer's avatar Jason Colyer
Browse files

Updating instructions to align with code revamp

parent bea5515f
No related branches found
No related tags found
Loading
......@@ -103,78 +103,39 @@ During the first week of the final month of the quarter, you need to setup all
the schedules we use to align with the requested changes in the
[Support Pagerduty Worksheet](https://docs.google.com/spreadsheets/d/1FdUzVXCZleopfteC2QxW7LJwyylGWGl9hwXHMPkRHbQ/edit?usp=sharing).
To do this, there is a script located in our
[Pagerduty project](https://gitlab.com/gitlab-com/support/support-ops/other-software/pagerduty)
called
[handle_pd_changes](https://gitlab.com/gitlab-com/support/support-ops/other-software/pagerduty/-/blob/master/handle_pd_changes).
To utilize this, you will need to download a CSV of each of the locked sheets.
To do that, you will go to the sheet in question, click `File` at the top menu,
hover over `Download`, and then click `Comma Separate Values (.csv)`. Doing so
will download that specific sheet to your computer. Keep in mind the CSV file
that is downloaded has the *entire spreadsheet* within it, so you **will** need
to modify the file to remove any entries beyond the following quarter.
You will then navigate to the location of the
[Pagerduty project](https://gitlab.com/gitlab-com/support/support-ops/other-software/pagerduty)
repo on your local computer.
To do this, we utilize the
[Schedule Implementer](https://gitlab.com/gitlab-support-readiness/pagerduty/schedule-implementer)
project.
Run the `bundle` command to download the needed gems. An example out this would
look like:
To utilize this, navigate to the location of the
[Schedule Implementer](https://gitlab.com/gitlab-support-readiness/pagerduty/schedule-implementer)
repo on your local computer.
```bash
jason@laptop:~/dev/gitlab-com/support/support-ops/other-software/pagerduty$ bundle
Using concurrent-ruby 1.2.2
Using i18n 1.14.1
Using minitest 5.18.1
Using tzinfo 2.0.6
Using activesupport 7.0.6
Using bundler 2.4.10
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-httpclient 1.0.1
Using multipart-post 2.3.0
Using faraday-multipart 1.0.4
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using faraday-rack 1.0.0
Using faraday-retry 1.0.3
Using ruby2_keywords 0.0.5
Using faraday 1.10.3
Using faraday_middleware 1.2.0
Using json 2.6.3
Using oj 3.13.23
Using yaml 0.2.1
Bundle complete! 5 Gemfile dependencies, 23 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
```
You will want to run the `bundle` command to download the needed gem (and it's
dependencies).
After doing so, you should verify you have the four needed environment variables
set in your local environment (see the project's
[README](https://gitlab.com/gitlab-com/support/support-ops/other-software/pagerduty/-/tree/master#variables-needed)
After doing so, you should verify you have the needed environment variables set
in your local environment (see the project's
[README](https://gitlab.com/gitlab-support-readiness/pagerduty/schedule-implementer#requirements)
for more details).
After that has been done, you will run the script with the needed parameters to
create all the overrides needed for the next quarter (again, see the project's
[README](https://gitlab.com/gitlab-com/support/support-ops/other-software/pagerduty/-/tree/master#definitions-for-running-the-script)
for more details). You can also run the commands `./handle_pd_changes HELP` and
`./handle_pd_changes DEFINE` to see more information on running the script.
With those in place, setup the config.json file within the data folder by doing
the following:
The output should show you if each override was created correctly. If you see a
status of 201, it was successful. If you see anything else, it did not succeed
(and manual intervention will be required).
```bash
echo $SERVICE_CREDS > data/config.json
```
An example of the script running would look like:
After that has been done, you will run the script itself using:
```bash
jason@laptop:~/dev/gitlab-com/support/support-ops/other-software/pagerduty$ ./handle_pd_changes AMER Emergencies 1 temp.csv
Status 201 for 2024-01-29T16:00:00Z to 2024-01-29T22:00:00Z
Status 201 for 2024-01-30T16:00:00Z to 2024-01-30T22:00:00Z
Status 201 for 2024-01-31T16:00:00Z to 2024-01-31T22:00:00Z
./bin/add_to_schedule
```
The output should show you if each override for each group within each schedule
was created correctly. If you see a status of 201, it was successful. If you see
anything else, it did not succeed (and manual intervention will be required).
After you have run that script, go into Pagerduty and check the corresponding
schedule for accuracy.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment