forked from CoinFabrik/geppetto
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from Deeptechia/main
Changes from main
- Loading branch information
Showing
6 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Deploy | |
on: | ||
push: | ||
branches: | ||
- main | ||
- staging | ||
|
||
jobs: | ||
ssh-command: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when there is a push to the "main" branch. | ||
# | ||
# To configure this workflow: | ||
# | ||
# 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. | ||
# | ||
# 2. Create and configure a Workload Identity Provider for GitHub (https://github.com/google-github-actions/auth#setting-up-workload-identity-federation) | ||
# | ||
# 3. Change the values for the GAR_LOCATION, GKE_ZONE, GKE_CLUSTER, IMAGE, REPOSITORY and DEPLOYMENT_NAME environment variables (below). | ||
# | ||
# For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke-kustomize | ||
|
||
name: Build and Deploy to GKE | ||
|
||
on: | ||
push: | ||
branches: [ "staging" ] | ||
|
||
env: | ||
PROJECT_ID: ${{ secrets.GKE_PROJECT }} # GKE_PROJECT creado en secrets del proyecto - Devops-Tools | ||
GAR_LOCATION: us-central1 # Region del Artifactor | ||
GKE_CLUSTER: autopilot-cluster-1 # Cree un nuevo cluster de Kubernetes | ||
GKE_ZONE: us-central1 # Zona del cluster | ||
DEPLOYMENT_NAME: gke-test # TODO: update to deployment name | ||
REPOSITORY: docker-repository # Cree un nuevo repositorio donde se almacenara la imagen de Docker | ||
IMAGE: geppetto | ||
|
||
jobs: | ||
setup-build-publish-deploy: | ||
name: Setup, Build, Publish, and Deploy | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Configure Workload Identity Federation and generate an access token. | ||
- id: 'auth' | ||
name: 'Authenticate to Google Cloud' | ||
uses: 'google-github-actions/auth@v0' | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/99059079106/locations/global/workloadIdentityPools/github/subject/SUBJECT_ATTRIBUTE_VALUE' | ||
service_account: 'deploy-geppetto-from-github@geppetto-408614.iam.gserviceaccount.com' | ||
|
||
|
||
|
||
# Alternative option - authentication via credentials json | ||
# - id: 'auth' | ||
# uses: 'google-github-actions/auth@v0' | ||
# with: | ||
# credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | ||
|
||
- name: Docker configuration | ||
run: |- | ||
docker login -u oauth2accesstoken -p ${{steps.auth.outputs.access_token}} https://$GAR_LOCATION-docker.pkg.dev | ||
# Get the GKE credentials so we can deploy to the cluster | ||
- name: Set up GKE credentials | ||
uses: google-github-actions/get-gke-credentials@v0 | ||
with: | ||
cluster_name: ${{ env.GKE_CLUSTER }} | ||
location: ${{ env.GKE_ZONE }} | ||
|
||
# Build the Docker image | ||
- name: Build | ||
run: |- | ||
docker build \ | ||
--tag "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" \ | ||
--build-arg GITHUB_SHA="$GITHUB_SHA" \ | ||
--build-arg GITHUB_REF="$GITHUB_REF" \ | ||
. | ||
# Push the Docker image to Google Artifact Registry | ||
- name: Publish | ||
run: |- | ||
docker push "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" | ||
# Set up kustomize | ||
- name: Set up Kustomize | ||
run: |- | ||
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 | ||
chmod u+x ./kustomize | ||
# Deploy the Docker image to the GKE cluster | ||
- name: Deploy | ||
run: |- | ||
# replacing the image name in the k8s template | ||
./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA | ||
./kustomize build . | kubectl apply -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api" | |
|
||
[tool.poetry] | ||
name = "geppetto" | ||
version = "0.2.1" | ||
version = "0.2.5" | ||
authors = [ | ||
"Lucas Arbues <[email protected]>", | ||
"Ignacio Peña <[email protected]>", | ||
|
@@ -17,7 +17,7 @@ authors = [ | |
"Carlos Sims <[email protected]>", | ||
"Camila Gallo Garcia <[email protected]>" | ||
] | ||
description = "Geppetto is a sophisticated Slack bot that facilitates seamless interaction with multiple AI models, including OpenAI's ChatGPT-4, DALL-E-3, and Google's Gemini model." | ||
description = "Geppetto is a sophisticated Slack bot that facilitates seamless interaction with multiple AI models, including OpenAI's ChatGPT, DALL-E, Claude and Google's Gemini model." | ||
readme = "README.md" | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
|
@@ -29,16 +29,16 @@ classifiers = [ | |
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
certifi = "^2023.11.17" | ||
certifi = "^2024.2.2" | ||
openai = "^1.4.0" | ||
python-dotenv = "^1.0.0" | ||
slack-bolt = "^1.18.1" | ||
slack-sdk = "^3.26.1" | ||
Pillow = "^10.1.0" | ||
google-generativeai = "^0.5.0" | ||
google-generativeai = "^0.7.2" | ||
IPython = "^8.0.0" | ||
unittest-xml-reporting = "^3.2.0" | ||
anthropic = "^0.32.0" | ||
anthropic = "^0.34.0" | ||
|
||
[tool.poetry.scripts] | ||
geppetto = "geppetto.main:main" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters