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

Draft PR for Joonas regarding Feature/milvus #725

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: 2.1

orbs:
silta: silta/silta@dev:master
kubernetes: circleci/[email protected]

executors:
cicd73:
Expand Down Expand Up @@ -31,6 +32,22 @@ jobs:
- site-query:
site_url: https://master.drupal-project-k8s.silta-aks.wdr.io/_ping.php

deploy:
docker:
- image: cimg/base:stable
steps:
- checkout
- kubernetes/install-kubectl
- kubernetes/install-helm
- run:
name: Deploy to Kubernetes
command: |
export MINIO_PASSWORD=$(kubectl get secret --namespace "drupal-project-k8s" feature-milvus-minio -o jsonpath="{.data.root-password}" | base64 -d)
helm repo add milvus https://milvus-io.github.io/milvus-helm/
helm repo update
helm dependency update ./drupal
helm upgrade --install my-release ./drupal -f ./drupal/values.yaml --set milvus.minio.auth.rootPassword=$MINIO_PASSWORD

commands:
site-query:
parameters:
Expand Down Expand Up @@ -144,7 +161,8 @@ workflows:
command: |
http_proxy=$SILTA_PROXY HTTPS_PROXY=$SILTA_PROXY \
helm install --dry-run --generate-name ./charts/drupal --values charts/drupal/test.values.yaml
silta_config: silta/silta.yml
silta_config: silta/silta.yml,silta/secrets
decrypt_files: silta/secrets
context: silta_dev
requires:
- build
Expand Down
7 changes: 7 additions & 0 deletions .ddev/commands/web/grumphp-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

## Description: Run a GrumPHP command.
## Usage: grumphp
## Example: "ddev grumphp"

php /var/www/html/vendor/bin/grumphp "$@"
27 changes: 27 additions & 0 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DDEV configuration for Drupal AI Experiments
# See the documentation for more options:
# https://ddev.readthedocs.io/en/stable/users/configuration/config/
name: drupal-project-k8s
type: drupal
docroot: web
php_version: "8.2"
webserver_type: nginx-fpm
xdebug_enabled: true
additional_hostnames: []
additional_fqdns: []
database:
type: mariadb
version: "10.11"
use_dns_when_possible: true
composer_version: "2"
disable_settings_management: true
web_environment:
- DB_NAME_DRUPAL=db
- DB_USER_DRUPAL=db
- DB_PASS_DRUPAL=db
- DB_HOST_DRUPAL=db
- DRUSH_OPTIONS_URI=https://drupal-project-k8s.ddev.site
- ENVIRONMENT_NAME=ddev
- EXEC_GRUMPHP_COMMAND=ddev php
- HASH_SALT=notsosecurehash
corepack_enable: false
82 changes: 82 additions & 0 deletions .ddev/docker-compose.milvus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
services:
etcd:
container_name: ddev-${DDEV_SITENAME}-etcd
image: quay.io/coreos/etcd:v3.5.5
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
volumes:
- ./milvus/volumes/etcd:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 30s
timeout: 20s
retries: 3
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}
minio:
container_name: ddev-${DDEV_SITENAME}-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
expose:
- "9001"
- "9000"
volumes:
- ./milvus/volumes/minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}
milvus:
container_name: ddev-${DDEV_SITENAME}-milvus
image: milvusdb/milvus:v2.4.1
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
volumes:
- ./milvus/volumes/milvus:/var/lib/milvus
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
expose:
- "19530"
- "9091"
depends_on:
- "etcd"
- "minio"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}
attu:
container_name: ddev-${DDEV_SITENAME}-attu
image: zilliz/attu:v2.3.10
expose:
- "3000"
environment:
- MILVUS_URL=milvus:19530
- VIRTUAL_HOST=${DDEV_SITENAME}.ddev.site
- HTTP_EXPOSE=8521:3000
- HTTPS_EXPOSE=8521:3000
- SERVER_NAME=${DDEV_SITENAME}.ddev.site
depends_on:
- "milvus"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
*.min.js
*.bundle.js
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": [
"airbnb",
"prettier",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"root": true,
"env": {
"es6": true,
"browser": true,
"jest": true
},
"globals": {
"Drupal": true
},
"rules": {
"strict": "off",
"prettier/prettier": "error"
}
}
28 changes: 24 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
# Ignore directories generated by Composer
/drush/contrib/
/.editorconfig
/.gitattributes
/vendor/
/web/_ping.php
/web/.gitignore
/web/core/
/web/modules/.gitignore
/web/modules/contrib/
/web/themes/.gitignore
/web/themes/contrib/
/web/profiles/.gitignore
/web/profiles/contrib/
/web/libraries/
/web/_ping.php
/web/sites/.gitignore
/web/sites/default/.gitignore

# Ignore database dumps
*.sql
*.sql.gz

# Ignore local configuration
/web/sites/*/settings.local.php

# Ignore Drupal's file directory
/web/sites/*/files/

# Ignore SimpleTest multi-site environment.
# Ignore testing directories.
/web/sites/simpletest
/web/tmp

# Ignore files generated by PhpStorm
/.idea/

# Ignore files generated by OS
.DS_Store

# Ignore .env files as they are personal
/.env
/.ddev/.env

# Ignore DDEV Milvus
.ddev/milvus

# Ignore node modules
node_modules


# Ignore helm chart dependencies.
charts/*/charts
/.editorconfig
/.gitattributes
/.gitattributes
Loading