| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| version: '3' |
| |
| tasks: |
| get-tokens: |
| desc: "Get Service Account tokens and save them to tokens directory" |
| silent: true |
| cmds: |
| - mkdir -p tokens |
| - kubectl get secret nuvolaris-wsku-secret -o jsonpath='{.data.token}' | base64 --decode > tokens/token |
| - kubectl get secret nuvolaris-wsku-secret -o jsonpath='{.data.ca\.crt}' | base64 --decode > tokens/ca.crt |
| |
| setup-developer: |
| desc: "Setup developer environment" |
| silent: true |
| cmds: |
| - task: get-tokens |
| - | |
| if [ ! -f .env ]; |
| then cp .env.example .env |
| echo "Please edit .env file with your local CouchDB and Kubernetes credentials" |
| fi |
| - | |
| if [ ! -d .venv ]; |
| then uv venv |
| fi |
| - uv pip install -r pyproject.toml 2>/dev/null |
| |
| run: |
| desc: | |
| Run the admin api locally, using configuration from .env file |
| cmds: |
| - uv run -m openserverless |