Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vimazeno/blog.limos.fr
  • matrossevi/blog.limos.fr
  • borlonjo/blog.limos.fr
3 results
Show changes
Commits on Source (192)
Showing
with 209 additions and 86 deletions
FROM debian:stable
ARG DEBIAN_FRONTEND=noninteractive
RUN { \
echo krb5-config krb5-config/default_realm string 'LOCAL.ISIMA.FR'; \
echo tzdata tzdata/Areas string 'Etc'; \
echo tzdata tzdata/Zones/Etc string 'UTC'; \
} | debconf-set-selections \
&& \
apt-get update && apt-get install -y --no-install-recommends \
krb5-user \
krb5-config \
openssh-client \
locales \
rsync \
&& \
locale-gen fr_FR \
locale-gen fr_FR.UTF-8 \
update-locale LANG=fr_FR.UTF-8 \
. /etc/default/locale
WORKDIR /srv/blog
\ No newline at end of file
FROM debian:stable
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
locales \
&& \
locale-gen fr_FR \
locale-gen fr_FR.UTF-8 \
update-locale LANG=fr_FR.UTF-8 \
. /etc/default/locale
COPY requirements.txt .
RUN pip install --break-system-packages --user -r requirements.txt
WORKDIR /srv/blog
\ No newline at end of file
source .env
SSH_CMD="ssh -o StrictHostKeyChecking=no -K ${KRB_USER}@${SERVER}"
RSYNC_CMD=''
kinit ${KRB_USER}
${SSH_CMD} "mkdir -p ~/public_html/"
${SSH_CMD} "echo 'Options +FollowSymLinks' > ~/public_html/.htaccess"
${SSH_CMD} "echo 'RewriteEngine on' >> ~/public_html/.htaccess"
${SSH_CMD} "echo 'RewriteCond %{HTTP_HOST} ^perso.isima.fr$' >> ~/public_html/.htaccess"
${SSH_CMD} "echo 'RewriteRule (.*) https://perso.limos.fr%{REQUEST_URI} [R=301,L]' >> ~/public_html/.htaccess"
${SSH_CMD} "mkdir -p ~/public_html/_"
${SSH_CMD} "echo '<FilesMatch "\.phar">' > ~/public_html/_/.htaccess"
${SSH_CMD} "echo ' php_flag engine off' >> ~/public_html/_/.htaccess"
${SSH_CMD} "echo ' ForceType application/octet-stream' >> ~/public_html/_/.htaccess"
${SSH_CMD} "echo ' Header set Content-Disposition attachment' >> ~/public_html/_/.htaccess"
${SSH_CMD} "echo '</FilesMatch>' >> ~/public_html/_/.htaccess"
rsync -az --exclude "_" -e "ssh -o StrictHostKeyChecking=no -K" ./output/ ${KRB_USER}@${SERVER}:~/public_html/
\ No newline at end of file
cd /srv/blog/content/slides
yarn
\ No newline at end of file
git submodule init
git submodule update --recursive --remote
sed -i 's/\$port &/\$port/g' ./develop_server.sh
chmod +x develop_server.sh
export PATH=/root/.local/bin:$PATH
export PY='/usr/bin/python3'
./develop_server.sh start 8000
\ No newline at end of file
PORT=8001
REGISTRY_URL=docker.isima.fr
NAMESPACE=docker.isima.fr/vimazeno
APP_NAME=pelican_perso
KRB_USER=vimazeno
SERVER=perso.local.isima.fr
......@@ -6,3 +6,4 @@ srv.pid
blog_limos.egg-info
node_modules
.venv
.vscode
\ No newline at end of file
image: ubuntu:xenial
cache:
paths:
- output/ # Node modules and dependencies
- output/ # le répertoire où se trouve le HTML statique généré
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
.pre:
image: node:latest
stage: .pre
script:
- cd /srv/blog/content/slides && yarn
build:
image: docker.isima.fr/vimazeno/pelican_perso_python:35046e8
stage: build
script:
- apt-get install -y --force-yes build-essential python-dev python-pip git nodejs nodejs-legacy npm
- pip install --upgrade pip==9.0.3
- pip install -r requirements.txt
- cd content && npm install && cd ..
- sed -i "s/RELATIVE_URLS = True/RELATIVE_URLS = False/" pelicanconf.py
- apt-get install -y --force-yes locales
- locale-gen fr_FR
- locale-gen fr_FR.UTF-8
- update-locale LANG=fr_FR.UTF-8
- . /etc/default/locale
- pelican content
artifacts:
untracked: true
- git submodule init
- git submodule update --recursive --remote
- PATH=/root/.local/bin:$PATH pelican
deploy:
image: docker.isima.fr/vimazeno/pelican_perso_kerberos:35046e8
stage: deploy
dependencies:
- build
script:
- apt-get install -y --force-yes rsync
- rsync -az --exclude '_' -e ssh output/ $USERNAME@$HOST:~/public_html/
when: manual
# récupération du KEYTAB en hexa
- echo "$KEYTAB" > my.keytab.hex
# conversion du KEYTAB en hexa en binaire
- sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' my.keytab.hex | xargs printf > my.keytab
# génération du ticket kerberos
- kinit -k -t my.keytab vimazeno@LOCAL.ISIMA.FR
# préparation du répertoire servi par apache
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "mkdir -p ~/public_html/"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo 'Options +FollowSymLinks' > ~/public_html/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo 'RewriteEngine on' >> ~/public_html/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo 'RewriteCond %{HTTP_HOST} ^perso.isima.fr$' >> ~/public_html/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo 'RewriteRule (.*) https://perso.limos.fr%{REQUEST_URI} [R=301,L]' >> ~/public_html/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "mkdir -p ~/public_html/_"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo '<FilesMatch "\.phar">' > ~/public_html/_/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo ' php_flag engine off' >> ~/public_html/_/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo ' ForceType application/octet-stream' >> ~/public_html/_/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo ' Header set Content-Disposition attachment' >> ~/public_html/_/.htaccess"
- ssh -o StrictHostKeyChecking=no -K vimazeno@perso.local.isima.fr "echo '</FilesMatch>' >> ~/public_html/_/.htaccess"
# rsync du HTML statique généré
- rsync -az --exclude '_' -e "ssh -o StrictHostKeyChecking=no -K" output/ vimazeno@perso.local.isima.fr:~/public_html/
\ No newline at end of file
BOLD := \033[1m
RESET := \033[0m
RED := \033[31m
GREEN := \033[32m
YELLOW := \033[33m
BLUE := \033[34m
MAGENTA := \033[35m
SHELL := /bin/bash
IMAGES := $(shell docker compose config --services)
TAG := $(shell git rev-parse --short HEAD)
VOLUMES := content/node_modules output
# Executables (local)
DOCKER_COMP := docker compose
.DEFAULT_GOAL := help
# Docker containers
KERBEROS_CONT := $(DOCKER_COMP) run kerberos
include .env
build: ## Build required docker compose images
@$(DOCKER_COMP) build
.PHONY: build
push: ## Push build docker compose images
@TAG=$(shell git rev-parse --short HEAD)
@docker login ${REGISTRY_URL}
@docker push ${NAMESPACE}/${APP_NAME}_python:latest ;
@docker tag ${NAMESPACE}/${APP_NAME}_python:latest ${NAMESPACE}/${APP_NAME}_python:${TAG} ;
@docker push ${NAMESPACE}/${APP_NAME}_python:${TAG} ;
@docker push ${NAMESPACE}/${APP_NAME}_kerberos:latest ;
@docker tag ${NAMESPACE}/${APP_NAME}_kerberos:latest ${NAMESPACE}/${APP_NAME}_kerberos:${TAG} ;
@docker push ${NAMESPACE}/${APP_NAME}_kerberos:${TAG} ;
.PHONY: push
up: ## Make required containers up
@$(DOCKER_COMP) up --remove-orphans node
@echo -e "⏰ ${BOLD}${GREEN}Wait for node to install needed js (there's no problem we're just wait)...${RESET}"
@$(DOCKER_COMP) run dockerize -timeout 180s -wait-retry-interval 3s \
-wait file:///tmp/content/node_modules/.yarn-integrity ;
@echo -e "⏰ ${BOLD}${GREEN}Wait for pelican to generate content (there's no problem we're just wait)...${RESET}"
@echo -e "${GREEN}${BOLD}up and running${RESET}"
@echo -e " 🐳 blog in docker ${BLUE}${BOLD}http://localhost:${PORT}${RESET}"
@$(DOCKER_COMP) up --remove-orphans python
.PHONY: up
down: ## Make required containers down
@$(DOCKER_COMP) down
.PHONY: down
logs: ## Show live containers logs. Pass the parameter "c=" to see one specific container's logs, example: make logs c='frontend'
@$(eval c ?=)
@if [ -z "$(c)" ]; then \
$(DOCKER_COMP) logs --follow; \
else \
$(DOCKER_COMP) logs --timestamps --follow $(c); \
fi
.PHONY: logs
errors: ## Show live container errors.
@$(DOCKER_COMP) logs | grep error
.PHONY: errors
publish: ## Open bash on php container
@$(KERBEROS_CONT) bash .docker/scripts/kerberos/command.dev.sh
.PHONY: publish
clean: ## Remove node and php folders and files
@for volume in ${VOLUMES} ; do \
sudo rm -rf $${volume} ; \
done
.PHONY: clean
slides: ## Force slides refresh
@sudo cp -R content/slides output/
.PHONY: slides
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
\ No newline at end of file
......@@ -6,7 +6,23 @@ source bin/activate
./bin/start
```
## Lancer le serveur de prévisualisation
## Utilisation avec docker
### Build image
```
docker build -t pelican_perso .
```
### run conatiner
```
docker run -it --rm -v $(pwd):/srv/pelican mjjacko/pelican pelican-quickstart -p my-site
```
## Utilisation avec venv
### Lancer le serveur de prévisualisation
```
bash develop_server.sh start
......@@ -14,7 +30,7 @@ bash develop_server.sh start
* http://0.0.0.0:8000/
## faire tourner les slides en local
### faire tourner les slides en local
```
./bin/local
......@@ -23,6 +39,7 @@ bash develop_server.sh start
* http://slides/slides/
## see also
* [https://limos.isima.fr/~mazenod/blog-et-pages-perso-au-limos.html](https://limos.isima.fr/~mazenod/blog-et-pages-perso-au-limos.html)
......@@ -3,7 +3,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]:-$0}" )/.." && pwd )"
if [[ ! -d "${DIR}/.venv" ]] ; then
virtualenv -p /usr/bin/python3 "${DIR}/.venv"
python3 -m venv "${DIR}/.venv"
fi
source "${DIR}/.venv/bin/activate"
......@@ -12,4 +12,4 @@ pip install -r requirements.txt
git submodule init
git submodule update --recursive --remote
cd content && npm install
cd content && yarn install
Title: Pint of Science - Surfez couvert
Date: 2018-05-15 19:00
Category: <i class='fa fa-bullhorn' aria-hidden='true'></i> Blog
Dans le cadre de <a href="https://pintofscience.fr">Pint of Science</a>, je suis intervenu lors d'une session <a href="https://pintofscience.fr/event/big-brother">Big Brother</a> pour expliquer les enjeux de vie privée et de protection des sources sur le web.
lien vers les slides: <a href="http://m4z3.me/pintofscience">http://m4z3.me/pintofscience</a>
Title: Bonnes pratiques en développement web (Frameworks, CLI, tests, intégration continue, git, github gitlab)
Date: 2017-04-13 10:55
Category: <i class='fa fa-bullhorn' aria-hidden='true'></i> Blog
Dans le cadre de la [9<sup>ème</sup> journée annuelle d'Aramis](http://aramis.resinfo.org/wiki/doku.php?id=pleniaires:pleniere13avril2017) le 13 avril 2017 à Saint-Etienne sur le Campus Tréfilerie à la Maison de l'Université Jean-Monnet.
Le thème était Dev & Ops : les outils du dialogue.
<iframe width="800" height="600" src="https://doc.m4z3.me/_/aramis/git.htm">
</iframe>
[support PDF](http://aramis.resinfo.org/wiki/lib/exe/fetch.php?media=pleniaires:vm-gitlab-dev_3ops.pdf), [support en ligne](http://doc.m4z3.me/_/aramis/git.htm), [vidéo](https://webcast.in2p3.fr/video/bonnes_pratiques_en_developpement_web)
Title: Sécurité Logicielle Web
Date: 2015-03-12 14:00
Category: <i class='fa fa-bullhorn' aria-hidden='true'></i> Blog
par Thomas LALLART (INRA - Avignon) et Vincent MAZENOD (CNRS - Clermont),
le jeudi 12 mars 2015 de 14h00 à 16h00, (Voir l'[affiche](http://audaces.asso.st/uploads/seminaires/affiche-SecuriteWeb-v2.pdf) ou la description sur [Indico](https://indico.in2p3.fr/event/11263/))
=> [Machine virtuelle de tests pour VirtualBox](http://audaces.asso.st/uploads/Lubuntu.vdi.zip) | Thomas Lallart.
Title: Conférence – table ronde : Monnaies virtuelles, Initial Coin Offerings (ICOs) et Blockchain : Innovations en finance majeures ?
Date: 2018-04-24 14:00
Category: <i class='fa fa-bullhorn' aria-hidden='true'></i> Blog
Dans le cadre de la Clermont Innovation Week, le Groupe ESC Clermont a organisé une conférence suivie d’une table ronde pour questionner les innovations en finance liées aux dernières évolutions du digital.
* La conférence introduira la soirée avec :
* Xavier LAVAYSSIERE, CEO de la société ECAN, qui parlera des enjeux liés aux monnaies virtuelles, aux ICO et à la Blockchain.
* Tristan COLOMBET, CEO de DOMRAIDER, qui permettra d’avoir un retour d’expérience sur une ICO réussie.
* La table ronde traitera des questions suivantes : « Les ICO sont-ils les IPO 2.0 de demain? » et « De l’ICO à la Blockchain : quelle(s) réalité(s) et quel modèle économique possible ? » avec les intervenants de ECAN et DOMRAIDER ainsi que :
* Cécile THEBAULT, Directeur des participations chez SOFIMAC IM
* Vincent MAZENOD, Ingénieur CNRS au LIMOS
* Alexandre MONNIN et Fabrice BIEN, Enseignants-chercheurs au Groupe ESC Clermont
Title: Interview dans La Montagne au sujet du ransomware WannaCry
Date: 2017-05-16 10:27
Category: <i class='fa fa-bullhorn' aria-hidden='true'></i> Blog
<div style="text-align: center; width: 100%">
<img src="../images/presse/wannacry.jpg" />
</div>
......@@ -2,6 +2,7 @@ Title: android-www
Date: 2017-09-20 10:30
Category: <i class='fa fa-graduation-cap' aria-hidden='true'></i> &Eacute;tudiants
Tags: Projets tutorés, android
Status: draft
## Contexte
......
......@@ -2,6 +2,7 @@ Title: CKEditor for gitlab
Date: 2017-09-20 10:55
Category: <i class='fa fa-graduation-cap' aria-hidden='true'></i> &Eacute;tudiants
Tags: Projets tutorés, www, Tor
Status: draft
## Contexte
......
......@@ -2,7 +2,7 @@ Title: G-Box
Date: 2017-09-20 10:15
Category: <i class='fa fa-graduation-cap' aria-hidden='true'></i> &Eacute;tudiants
Tags: Projets tutorés, sécurité
Status: draft
## Contexte
La G-box est un routeur avec des fonctionnalités de sécurité, elle permet notamment de filtrer les flux sortant à des fins de contrôle parental ou de filtre anti-phishing.
......
......@@ -2,6 +2,7 @@ Title: gitlab-issue
Date: 2017-09-20 10:25
Category: <i class='fa fa-graduation-cap' aria-hidden='true'></i> &Eacute;tudiants
Tags: Projets tutorés, www, git
Status: draft
## Contexte
......