Skip to content

Commit 3ec5cdf

Browse files
committed
initial push
0 parents  commit 3ec5cdf

File tree

21 files changed

+6125
-0
lines changed

21 files changed

+6125
-0
lines changed

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# compiled output
2+
/dist
3+
/node_modules
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
pnpm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
14+
# OS
15+
.DS_Store
16+
17+
# Tests
18+
/coverage
19+
/.nyc_output
20+
21+
# IDEs and editors
22+
/.idea
23+
.project
24+
.classpath
25+
.c9/
26+
*.launch
27+
.settings/
28+
*.sublime-workspace
29+
30+
# IDE - VSCode
31+
.vscode/*
32+
!.vscode/settings.json
33+
!.vscode/tasks.json
34+
!.vscode/launch.json
35+
!.vscode/extensions.json

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6+
[circleci-url]: https://circleci.com/gh/nestjs/nest
7+
8+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9+
<p align="center">
10+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14+
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
15+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
18+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
19+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
20+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
21+
</p>
22+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
23+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
24+
25+
## Description
26+
27+
Daemon pour Sesame. Le demon est chargé d'executer les backends sur les ordres de l'orchestrator
28+
## Installation developpement
29+
un environnement de developpement est donné en docker
30+
31+
32+
### Installation système
33+
#### Debian
34+
35+
36+
37+
## License
38+
39+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
echo "Hello Word"
3+
sleep 2
4+
echo "j'ai recu :"
5+
cat -
6+
echo "je provoque une erreur " >&2
7+
exit 255

backends/backend1/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
name: 'config1'
3+
description: 'Config1 backend for tests'
4+
active: 1
5+
actions:
6+
CHANGEPWD:
7+
exec: "changepasswd.sh"
8+
onError: 'stop'
9+
ADDIDENT:
10+
exec: 'dummy.sh'
11+
UPDATEIDENT:
12+
exec: 'dummy.sh'
13+
DELIDENT:
14+
exec: 'dummy.sh'
15+
PING:
16+
exec: 'ping.sh'
17+

backends/dummy/bin/dummy.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
echo "Hello Word"

backends/dummy/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'dummy'
2+
description: 'Dummy backend for tests'
3+
active: 1
4+
actions:
5+
CHANGEPWD:
6+
exec: "dummy.sh"
7+
onError: 'stop'
8+
ADDIDENT:
9+
exec: 'dummy.sh'
10+
UPDATEIDENT:
11+
exec: 'dummy.sh'
12+
DELIDENT:
13+
exec: 'dummy.sh'
14+
15+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Default settings for sesame-backend
2+
3+
# Options for sesame daemon
4+
REDIS_HOST=localhost
5+
REDIS_PORT=6379
6+
REDIS_USER=
7+
REDIS_PASSWORD=
8+
BACKENDS_PATH=/var/lib/sesame-daemon/backends
9+
NAME_QUEUE=backend
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=sesame-daemon
3+
4+
[Service]
5+
EnvironmentFile=-/etc/default/sesame-daemon
6+
ExecStart=/usr/bin/sesame-daemon
7+
Restart=always
8+
User=nobody
9+
# Note Debian/Ubuntu uses 'nogroup', RHEL/Fedora uses 'nobody'
10+
Group=nogroup
11+
WorkingDirectory=/var/lib/sesame-daemon
12+
13+
[Install]
14+
WantedBy=multi-user.target

docker/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM debian:12
2+
LABEL description="Libertech Dev" \
3+
maintainer="Libertech <aide@libertech.fr>" \
4+
vendor=Libertech \
5+
name="daemonjsdev"
6+
7+
ENV TIMEZONE=Europe/Paris \
8+
LANGUAGE=fr_FR.UTF-8 \
9+
LANG=fr_FR.UTF-8 \
10+
DEBIAN_FRONTEND=noninteractive \
11+
SUPERVISOR_VERSION=4.0.1 \
12+
GOSU_VERSION=1.11 \
13+
TERM=xterm \
14+
BRANCHNAME=master
15+
16+
RUN apt clean -y \
17+
&& apt update -y \
18+
&& apt upgrade -y \
19+
&& apt install -y locales \
20+
&& export LANGUAGE=${LANGUAGE} \
21+
&& export LANG=${LANG} \
22+
&& export LC_ALL=${LC_ALL} \
23+
&& locale-gen ${LANG} \
24+
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
25+
&& apt install --no-install-recommends -yq \
26+
procps nodejs npm yarn supervisor
27+
28+
WORKDIR /usr/app/src
29+
COPY ./rootfs /
30+
31+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
32+
33+

docker/docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3'
2+
services:
3+
test-daemon:
4+
build: .
5+
container_name: testdaemon
6+
volumes:
7+
- "./src:/data"
8+
networks:
9+
- dev
10+
networks:
11+
dev:
12+
external: true

0 commit comments

Comments
 (0)