-
Notifications
You must be signed in to change notification settings - Fork 7
Configuring the Development Environment
Install Python3 3.12 from the Python downloads page.
Important
Python 3.13 has an issue with some of the dependencies (see here). You must use Python 3.12.
Linux users should install Python using their distribution's package manager.
Windows users need to enable some optional settings:
You need to turn off App Installer
from App execution aliases:
Windows users will also need to install the Visual Studio build tools from here, selecting Desktop development with C++
:
git clone https://github.com/OctopusSolutionsEngineering/OctopusCopilot.git
cd OctopusCopilot
Virtual environments provide an isolated space for project dependencies.
python3 -m venv .venv
source .venv/bin/activate
.venv/Scripts/Activate.ps1
pip3 install -r requirements.txt
Octoterra is a service used to convert Octopus resources to HCL. The HCL is then passed to an LLM as context to describe the configuration of the Octopus instance.
- Download the latest release from GitHub for your operating system.
- Extract the zip file
Octoterra must be run listening on port 8081. The port is determined by the environment variable FUNCTIONS_CUSTOMHANDLER_PORT
.
FUNCTIONS_CUSTOMHANDLER_PORT=8081 ./octoterra_linux_amd64_azure
FUNCTIONS_CUSTOMHANDLER_PORT=8081 ./octoterra_macos_arm64_azure
$env:FUNCTIONS_CUSTOMHANDLER_PORT=8081
./octoterra_windows_amd64_azure.exe
There are a number of environment variables capturing secrets required to run the Copilot backend.
Octonaughts can ping @matthew.casperson in #project-github-copilot to access the shared password containing the values for these variables.
The shared password is called Octopus Copilot OpenAI
.
Linux users can place the following code snippet into /etc/environment
or ~/.profile
. macOS users can place the code in ~/.zshenv'
:
export OCTOPUS_CLI_API_KEY=API-xxxx
export OCTOPUS_CLI_SERVER=https://yourinstance.octopus.app
export OPENAI_ENDPOINT=https://xxx.openai.azure.com/
export OPENAI_API_KEY=xxx
export OPENAI_API_DEPLOYMENT=gpt4o
export APPLICATION_OCTOTERRA_URL=http://localhost:8081
Windows users should define the environment variables in System Properties.
The CLI interface is for local testing. We don't distribute the CLI for any production usage.
python3 main.py --query "Show the projects from the Default space"
python main.py --query "Show the projects from the Default space"
Enable the Black tool in Pycharm and configure it to run on save and reformat: