Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulumi for hackweek #148

Merged
merged 31 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5060269
📝 update pulumi readme
rchan26 Jan 4, 2024
2dacac0
🚀 update hackweek pulumi scripts
rchan26 Jan 4, 2024
5fbc6d8
🙈 ignore env files
rchan26 Jan 4, 2024
c0b0263
🚀 pulumi scripts for production
rchan26 Jan 4, 2024
27a0e2d
Merge branch 'main' into pulumi-hackweek
rchan26 Jan 4, 2024
a5c6138
🚀 automation powershell script for restarting container
rchan26 Jan 4, 2024
2a4fc11
🚀 automation powershell script for turning on and off VM
rchan26 Jan 4, 2024
a0ae585
Merge branch 'main' into pulumi-production
rchan26 Jan 4, 2024
593cfde
Merge branch 'main' into pulumi-hackweek
rchan26 Jan 5, 2024
0ee278b
🐛 updates to resources request and change handbook to completion
rchan26 Jan 5, 2024
703fac4
⬆️ upgrade openai>1.0.0 and update code for upgrades
rchan26 Jan 5, 2024
9785700
🐛 use gh_token in wiki collection
rchan26 Jan 5, 2024
a6cdf6b
📝 wikis reader docstrings
rchan26 Jan 5, 2024
d1d83e5
⚡️ increase batch size for sentencetransformer
rchan26 Jan 6, 2024
4ae9acc
📝 rename handbook to completion
rchan26 Jan 8, 2024
1ffc3ed
⬆️ update slack-sdk dependency
rchan26 Jan 8, 2024
255414e
Merge branch 'dependency-updates' into pulumi
rchan26 Jan 8, 2024
85ec954
🚀 split up data and bots container groups
rchan26 Jan 9, 2024
ab27efe
Merge branch 'dependency-updates' into pulumi-production
rchan26 Jan 9, 2024
8374d9e
Merge branch 'pulumi-hackweek' into pulumi-production
rchan26 Jan 9, 2024
2bab248
🚀 create automation account in __main__.py
rchan26 Jan 9, 2024
8c735e8
🚀 rename api-bot to production
rchan26 Jan 9, 2024
ad1d8da
📝 rename llama-cpp container to production
rchan26 Jan 9, 2024
7b90e96
Merge pull request #147 from alan-turing-institute/pulumi-production
rchan26 Jan 11, 2024
91a992d
⚡️ change back to load containers to main
rchan26 Jan 11, 2024
2a71536
Merge branch 'pulumi-production' into pulumi-hackweek
rchan26 Jan 11, 2024
68edc5a
⬆️ bump pulumi versions
rchan26 Jan 11, 2024
ad12102
⬆️ update gitpython, llama-index, llama-hub dep
rchan26 Jan 11, 2024
667950e
📝 rename handbook env vars to completion
rchan26 Jan 12, 2024
677cc68
look for env variables in env, then .pulumi_env, then manual if still…
rwood-97 Jan 12, 2024
e529158
remove encryption key versions
rwood-97 Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,10 @@ azure/*/.secrets
azure/*.secrets
azure/*/Pulumi.*.yaml
data/llama_index_indices/all_data/

# environment files
*.env
*_env

# misc
.vscode/
42 changes: 37 additions & 5 deletions azure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,49 @@ You will need to install

in order to run this code.

1. Setup the Pulumi backend (if it already exists this will just check that you have access)
1. Have a .pulumi_env file (in this directory) including the variables that you need.

For the `api_bot` model, you will need to have the following variables:

```bash
REGINALD_SLACK_APP_TOKEN
REGINALD_SLACK_BOT_TOKEN
REGINALD_API_URL
GITHUB_TOKEN
```

For the `hack_week` model, you will need to have the following variables:

```bash
OPENAI_AZURE_API_BASE
OPENAI_AZURE_API_KEY
COMPLETION_SLACK_APP_TOKEN
COMPLETION_SLACK_BOT_TOKEN
GPT_AZURE_SLACK_APP_TOKEN
GPT_AZURE_SLACK_BOT_TOKEN
GITHUB_TOKEN
OPENAI_API_KEY (optional)
```

2. Move into the folder for the model you want to deploy, e.g. for the `api_bot` model:

```bash
cd api_bot
```

3. Setup the Pulumi backend (if it already exists this will just check that you have access)

```bash
./setup.sh
```

this will also create a local `.secrets` file
This may create a local `.secrets` file.
This file contains the secrets that you need to deploy the model and includes the environment variables needed for the container instance (see Step 1.).
You will need to source this file before deploying in the next step.

2. Deploy with Pulumi
4. Deploy with Pulumi

```bash
> source .secrets
> AZURE_KEYVAULT_AUTH_VIA_CLI=true pulumi update
> source .secrets (if this exists)
> AZURE_KEYVAULT_AUTH_VIA_CLI=true pulumi up
```
4 changes: 0 additions & 4 deletions azure/api_bot/Pulumi.yaml

This file was deleted.

89 changes: 0 additions & 89 deletions azure/api_bot/__main__.py

This file was deleted.

4 changes: 2 additions & 2 deletions azure/hack_week/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: reginald
name: reginald_hack_week
runtime:
name: python
description: Slack bot to respond to REG queries
description: Slack bot to respond to REG queries. Models developed during REG Hack Week 2023.
Loading