devel: add server run script and environment
This commit is contained in:
8
components/in-mem/pubsub.yaml
Normal file
8
components/in-mem/pubsub.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: pubsub
|
||||
spec:
|
||||
type: pubsub.in-memory
|
||||
version: v1
|
||||
metadata: []
|
||||
10
components/in-mem/statestore.yaml
Normal file
10
components/in-mem/statestore.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: statestore
|
||||
spec:
|
||||
type: state.in-memory
|
||||
version: v1
|
||||
metadata:
|
||||
- name: actorStateStore
|
||||
value: "true"
|
||||
8
components/local/pubsub.yaml
Normal file
8
components/local/pubsub.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: pubsub
|
||||
spec:
|
||||
type: pubsub.in-memory
|
||||
version: v1
|
||||
metadata: []
|
||||
8
components/local/redis-secret.yaml
Normal file
8
components/local/redis-secret.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: staging-redis
|
||||
namespace: redis
|
||||
data:
|
||||
redis-password: c0NVb1VkdVRoWQ==
|
||||
type: Opaque
|
||||
22
components/local/statestore.yaml
Normal file
22
components/local/statestore.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: statestore
|
||||
scopes:
|
||||
- atlantis
|
||||
spec:
|
||||
type: state.redis
|
||||
version: v1
|
||||
metadata:
|
||||
- name: redisHost
|
||||
value: localhost:26379
|
||||
- name: redisUsername
|
||||
value: default
|
||||
- name: redisPassword
|
||||
secretKeyRef:
|
||||
key: redis-password
|
||||
name: staging-redis
|
||||
- name: actorStateStore
|
||||
value: "true"
|
||||
- name: redisDB
|
||||
value: "1"
|
||||
10
components/local/subscriptions.yaml
Normal file
10
components/local/subscriptions.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: slurm
|
||||
spec:
|
||||
topic: hipster
|
||||
route: /slurm-events
|
||||
pubsubname: pubsub
|
||||
scopes:
|
||||
- atlantis
|
||||
10
shell.nix
10
shell.nix
@@ -5,9 +5,10 @@ in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
kustomize
|
||||
tilt
|
||||
nodejs
|
||||
mkcert
|
||||
dapr-cli
|
||||
tilt
|
||||
];
|
||||
|
||||
DOCKER_BUILDKIT = 0;
|
||||
@@ -15,9 +16,14 @@ pkgs.mkShell {
|
||||
LOG_LEVEL = 4;
|
||||
CLIENT_PORT = port + 80;
|
||||
SERVER_PORT = port + 85;
|
||||
# SERVER_PROXY_PORT = port + 95;
|
||||
TILT_PORT = port + 50;
|
||||
|
||||
CONTEXT = "staging-vcluster";
|
||||
NAMESPACE = "atlantis";
|
||||
REDIS = "localhost:26379";
|
||||
DB_HOST = "localhost";
|
||||
DB_PORT = 25432;
|
||||
|
||||
shellHook = ''
|
||||
mkdir -p ~/.vite-plugin-mkcert
|
||||
ln -sf ${pkgs.mkcert}/bin/mkcert ~/.vite-plugin-mkcert
|
||||
|
||||
14
src/Server/run
Executable file
14
src/Server/run
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# vim:ft=sh
|
||||
|
||||
top="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||
|
||||
kc="kubectl --context $CONTEXT -n $NAMESPACE --request-timeout 2s"
|
||||
export REDIS_PASSWORD=$($kc get secret staging-redis --template='{{ index .data "redis-password" }}' | base64 -d)
|
||||
export DB_PASSWORD=$($kc get secret staging-archmeister-app --template={{.data.password}} | base64 -d)
|
||||
|
||||
cd $top/Server
|
||||
case $1 in
|
||||
"watch") dapr run --app-id atlantis --app-port 8085 -- dotnet watch run ;;
|
||||
*) dapr run --app-id atlantis --app-port 8085 -- dotnet run ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user