Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions doodle-master/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
pull_request:
push:
branches: [main, master]

jobs:
api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "11"
cache: maven

- name: Build (no tests)
run: mvn -B -ntp clean verify -DskipTests

- name: Static analysis report (non-blocking)
continue-on-error: true
run: mvn -B -ntp checkstyle:checkstyle

- name: Unit tests (known failing baseline, non-blocking)
continue-on-error: true
run: mvn -B -ntp test

front:
runs-on: ubuntu-latest
defaults:
run:
working-directory: front
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
cache: npm
cache-dependency-path: front/package-lock.json

- name: Install
run: npm ci

- name: Lint
run: npm run lint

- name: Tests
run: npm run test:ci
3 changes: 3 additions & 0 deletions doodle-master/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "disabled"
}
35 changes: 35 additions & 0 deletions doodle-master/README.french.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Doodle in quarkus

Ce repository est une application de type doodle développée avec quarkus.io pour le back et angular pour le front.

Elle initialise automatiquement un pad pour la réunion et un salon de discussion.

Le but est de faire travailler les étudiants sur la partie déploiement de ce type d'application dite cloud native.

Votre mission est de mettre en production une telle application en permettant
- qu'à chaque commit sur ce repository, si les tests passent, alors nous déployons automatiquement une nouvelle version dans un contexte (Continuous Deployement)
- que l'application doit être monitorer finement.
- que l'application redémarre automatiquement en cas de crash du serveur ou de crash d'un des services de l'application.
- que Les accès doivent http doivent utiliser https.


Une démo de l'application est accessible [ici](https://doodle.diverse-team.fr).

- Voici une petite [vidéo](https://drive.google.com/file/d/1GQbdgq2CHcddTlcoHqM5Zc8Dw5o_eeLg/preview) de présentation des fonctionnalités de l'application.
- Voici une petite [vidéo](https://drive.google.com/file/d/1l5UAsU5_q-oshwEW6edZ4UvQjN3-tzwi/preview) de présentation de l'architecture de l'application.
- Voici une petite [vidéo](https://drive.google.com/file/d/1jxYNfJdtd4r_pDbOthra360ei8Z17tX_/preview) de revue de code de l'application.

Un descriptif du cours, des TPs et des étapes du projet est lui accessible [ici](https://hackmd.diverse-team.fr/s/SJqu5DjSD)

## Prérequis

Vérifiez que vous avez installé sur votre machine de développement :

- Java (JDK) 11+, e.g. [Oracle JSE](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) (avec la variable d'environnement JAVA_HOME bien configurée)
- [Maven](http://maven.apache.org/install.html)
- [Git](https://git-scm.com/download/)
- [Docker](https://docs.docker.com/engine/install/) (au moins version 19.03.0, 20.10 préféré)
- Docker compose ([Compose V2](https://docs.docker.com/compose/cli-command/#installing-compose-v2) préféré, nécésité de lancer des configuration compose en version 3.8)
- [Node](https://nodejs.org/en/) au moins version 16
- npm au moins version 8 (installé avec Node)
- Un IDE Java (Eclipse, IntelliJ IDEA, NetBeans, VS Code, Xcode, etc.)
31 changes: 31 additions & 0 deletions doodle-master/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Remote meetings planning

This project is used in a course on the *ops* part at the [University of Rennes](https://www.univ-rennes1.fr/), France. It is a kind of doodle clone developed in so-called "cloud-native" technologies in order to allow students to work on a continuous deployment chain in a containerized environment. Among the feature, the application automatically initializes a pad for the meeting and a chat room for the meeting participants.

- The [back](https://github.com/barais/doodlestudent/tree/main/api) is developed using the [quarkus.io](https://quarkus.io/) framework.
- The [front](https://github.com/barais/doodlestudent/tree/main/front) is developed in [angular](https://angular.io/) using the [primeng](https://www.primefaces.org/primeng/) angular UI component library and the [fullcalendar](https://fullcalendar.io/) graphical component.

A demo of the application is available [here](https://doodle.diverse-team.fr/).

Three videos (in french) are available. They present:
- the [main application feature](https://drive.google.com/file/d/1GQbdgq2CHcddTlcoHqM5Zc8Dw5o_eeLg/preview),
- its [architecture](https://drive.google.com/file/d/1l5UAsU5_q-oshwEW6edZ4UvQjN3-tzwi/preview)
- and a [short code review](https://drive.google.com/file/d/1jxYNfJdtd4r_pDbOthra360ei8Z17tX_/preview) .

For french native speaker that wants to follow the course. The course web page is available [here](https://hackmd.diverse-team.fr/s/SJqu5DjSD).

## Requirments

Verify that these are installed on your computer :

- Java (JDK) 11+, e.g. [Oracle JSE](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) (with the JAVA_HOME environment variable correctly set)
- [Maven](http://maven.apache.org/install.html)
- [Git](https://git-scm.com/download/)
- [Docker](https://docs.docker.com/engine/install/) (at least version 19.03.0, 20.10 preferred)
- Docker compose ([Compose V2](https://docs.docker.com/compose/cli-command/#installing-compose-v2) preferred, should be able to run 3.8 compose files)
- [Node](https://nodejs.org/en/) at least version 16
- npm at least version 8 (installed with Node)
- A Java IDE (Eclipse, IntelliJ IDEA, NetBeans, VS Code, Xcode, etc.)

If you are on Windows, Docker can not mount files outside your user folder (Unless an absolute path is provided).
Please, clone the doodle in the user folder or change the compose file to correctly mount the etherpad APIKEY.txt
5 changes: 5 additions & 0 deletions doodle-master/api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/quarkus-app/*
37 changes: 37 additions & 0 deletions doodle-master/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
.mvn/wrapper/maven-wrapper.jar
# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode
.factorypath

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

2 changes: 2 additions & 0 deletions doodle-master/api/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1 change: 1 addition & 0 deletions doodle-master/api/APIKEY.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19d89ca52bc0fa4f19d6325464d9d7a032649b9fa68c111514627081e2784b4a
53 changes: 53 additions & 0 deletions doodle-master/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# code-with-quarkus project

This project uses Quarkus, the Supersonic Subatomic Java Framework.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

## Running the application in dev mode

You can run your application in dev mode that enables live coding using:
```shell script
docker-compose up --detach
# Wait the correct start of the docker services and then
./mvnw compile quarkus:dev
```

To stop the application and its dependencies, type `ctrl+c` in the bash session and run `docker-compose down`.

## Packaging and running the application

The application can be packaged using:
```shell script
./mvnw package
```
It produces the `code-with-quarkus-1.0.0-SNAPSHOT-runner.jar` file in the `/target` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/lib` directory.
If you want to build an _über-jar_, execute the following command:
```shell script
./mvnw clean package -Dquarkus.package.type=uber-jar
```

The application is now runnable using `java -jar target/code-with-quarkus-1.0.0-SNAPSHOT-runner.jar`.

## Creating a native executable

You can create a native executable using:
```shell script
./mvnw package -Pnative
```

Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script
./mvnw package -Pnative -Dquarkus.native.container-build=true
```

You can then execute your native executable with: `./target/code-with-quarkus-1.0.0-SNAPSHOT-runner`

If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html.

# RESTEasy JAX-RS

Guide: https://quarkus.io/guides/rest-json


22 changes: 22 additions & 0 deletions doodle-master/api/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3.8"
services:
db:
image: mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=tlc
- MYSQL_USER=tlc
- MYSQL_PASSWORD=tlc
etherpad:
image: etherpad/etherpad:latest
ports:
- "9001:9001"
volumes:
- ./APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
mail:
image: bytemark/smtp
restart: always
ports:
- "2525:25"
Loading