Skip to content

Commit aa3057f

Browse files
committed
feat: backup old posts
1 parent 591f594 commit aa3057f

23 files changed

+1190
-14
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_site/

404.html

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
permalink: /404.html
3+
layout: default
4+
---
5+
6+
<style type="text/css" media="screen">
7+
.container {
8+
margin: 10px auto;
9+
max-width: 600px;
10+
text-align: center;
11+
}
12+
h1 {
13+
margin: 30px 0;
14+
font-size: 4em;
15+
line-height: 1;
16+
letter-spacing: -1px;
17+
}
18+
</style>
19+
20+
<div class="container">
21+
<h1>404</h1>
22+
23+
<p><strong>Page not found :(</strong></p>
24+
<p>The requested page could not be found.</p>
25+
</div>

Gemfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
source "https://rubygems.org"
2+
# Hello! This is where you manage which Jekyll version is used to run.
3+
# When you want to use a different version, change it below, save the
4+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5+
#
6+
# bundle exec jekyll serve
7+
#
8+
# This will help ensure the proper Jekyll version is running.
9+
# Happy Jekylling!
10+
gem "jekyll", "~> 4.3.2"
11+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12+
gem "minima", "~> 2.5"
13+
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
14+
# uncomment the line below. To upgrade, run `bundle update github-pages`.
15+
# gem "github-pages", group: :jekyll_plugins
16+
# If you have any plugins, put them here!
17+
group :jekyll_plugins do
18+
gem "jekyll-feed", "~> 0.12"
19+
end
20+
21+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
22+
# and associated library.
23+
platforms :mingw, :x64_mingw, :mswin, :jruby do
24+
gem "tzinfo", ">= 1", "< 3"
25+
gem "tzinfo-data"
26+
end
27+
28+
# Performance-booster for watching directories on Windows
29+
# gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
30+
31+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
32+
# do not have a Java counterpart.
33+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

Gemfile.lock

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.5)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.2.2)
8+
em-websocket (0.5.3)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0)
11+
eventmachine (1.2.7)
12+
ffi (1.16.1)
13+
forwardable-extended (2.6.0)
14+
google-protobuf (3.24.3-x86_64-linux)
15+
http_parser.rb (0.8.0)
16+
i18n (1.14.1)
17+
concurrent-ruby (~> 1.0)
18+
jekyll (4.3.2)
19+
addressable (~> 2.4)
20+
colorator (~> 1.0)
21+
em-websocket (~> 0.5)
22+
i18n (~> 1.0)
23+
jekyll-sass-converter (>= 2.0, < 4.0)
24+
jekyll-watch (~> 2.0)
25+
kramdown (~> 2.3, >= 2.3.1)
26+
kramdown-parser-gfm (~> 1.0)
27+
liquid (~> 4.0)
28+
mercenary (>= 0.3.6, < 0.5)
29+
pathutil (~> 0.9)
30+
rouge (>= 3.0, < 5.0)
31+
safe_yaml (~> 1.0)
32+
terminal-table (>= 1.8, < 4.0)
33+
webrick (~> 1.7)
34+
jekyll-feed (0.17.0)
35+
jekyll (>= 3.7, < 5.0)
36+
jekyll-sass-converter (3.0.0)
37+
sass-embedded (~> 1.54)
38+
jekyll-seo-tag (2.8.0)
39+
jekyll (>= 3.8, < 5.0)
40+
jekyll-watch (2.2.1)
41+
listen (~> 3.0)
42+
kramdown (2.4.0)
43+
rexml
44+
kramdown-parser-gfm (1.1.0)
45+
kramdown (~> 2.0)
46+
liquid (4.0.4)
47+
listen (3.8.0)
48+
rb-fsevent (~> 0.10, >= 0.10.3)
49+
rb-inotify (~> 0.9, >= 0.9.10)
50+
mercenary (0.4.0)
51+
minima (2.5.1)
52+
jekyll (>= 3.5, < 5.0)
53+
jekyll-feed (~> 0.9)
54+
jekyll-seo-tag (~> 2.1)
55+
pathutil (0.16.2)
56+
forwardable-extended (~> 2.6)
57+
public_suffix (5.0.3)
58+
rake (13.0.6)
59+
rb-fsevent (0.11.2)
60+
rb-inotify (0.10.1)
61+
ffi (~> 1.0)
62+
rexml (3.2.6)
63+
rouge (4.1.3)
64+
safe_yaml (1.0.5)
65+
sass-embedded (1.68.0)
66+
google-protobuf (~> 3.23)
67+
rake (>= 13.0.0)
68+
terminal-table (3.0.2)
69+
unicode-display_width (>= 1.1.1, < 3)
70+
unicode-display_width (2.4.2)
71+
webrick (1.8.1)
72+
73+
PLATFORMS
74+
x86_64-linux
75+
76+
DEPENDENCIES
77+
http_parser.rb (~> 0.6.0)
78+
jekyll (~> 4.3.2)
79+
jekyll-feed (~> 0.12)
80+
minima (~> 2.5)
81+
tzinfo (>= 1, < 3)
82+
tzinfo-data
83+
84+
BUNDLED WITH
85+
2.4.19

README.md

-1
This file was deleted.

_config.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Welcome to Jekyll!
2+
#
3+
# This config file is meant for settings that affect your whole blog, values
4+
# which you are expected to set up once and rarely edit after that. If you find
5+
# yourself editing this file very often, consider using Jekyll's data files
6+
# feature for the data you need to update frequently.
7+
#
8+
# For technical reasons, this file is *NOT* reloaded automatically when you use
9+
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
10+
#
11+
# If you need help with YAML syntax, here are some quick references for you:
12+
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
13+
# https://learnxinyminutes.com/docs/yaml/
14+
#
15+
# Site settings
16+
# These are used to personalize your new site. If you look in the HTML files,
17+
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
18+
# You can create any custom variable you would like, and they will be accessible
19+
# in the templates via {{ site.myvariable }}.
20+
21+
title: Benoît Suttor's blog
22+
23+
description: >- # this means to ignore newlines until "baseurl:"
24+
This is a blog about my journey in IT.
25+
baseurl: "" # the subpath of your site, e.g. /blog
26+
url: "https://bsuttor.github.io/" # the base hostname & protocol for your site, e.g. http://example.com
27+
twitter_username: bensuttor
28+
github_username: bsuttor
29+
30+
# Build settings
31+
theme: minima
32+
plugins:
33+
- jekyll-feed
34+
35+
# Exclude from processing.
36+
# The following items will not be processed, by default.
37+
# Any item listed under the `exclude:` key here will be automatically added to
38+
# the internal "default list".
39+
#
40+
# Excluded items can be processed by explicitly listing the directories or
41+
# their entries' file path in the `include:` list.
42+
#
43+
# exclude:
44+
# - .sass-cache/
45+
# - .jekyll-cache/
46+
# - gemfiles/
47+
# - Gemfile
48+
# - Gemfile.lock
49+
# - node_modules/
50+
# - vendor/bundle/
51+
# - vendor/cache/
52+
# - vendor/gems/
53+
# - vendor/ruby/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: post
3+
title: "How I created my blog with Heroku and Plone"
4+
date: 2014-12-22 20:31:57 +0200
5+
tags: Heroku Python Plone
6+
---
7+
8+
*In this post, I explain how I use Heroku and the [heroku build pack](https://github.com/plone/heroku-buildpack-plone) for the creation of a blog. I have thinking about create a blog with plone and Heroku after the ploneconf in Bristol and the talk of [zupo](https://github.com/zupo) (thanks for his great job).*
9+
10+
11+
So I started... I created a blog because of a friend (a no developer guy) would like to have a blog. And I thought, maybe it's a good idea to try plone with heroku. In this case I tried to make a very easy Plone site with only "Blog Post" object available (I changed my mind after). I created 2 pacakges:
12+
13+
- blog.post
14+
- blog.policy
15+
16+
17+
And I also create a [buildout](https://github.com/bsuttor/blog.buildout).
18+
19+
Buildout was very easy because of documentation of [heroku build pack](https://github.com/plone/heroku-buildpack-plone), I added a heroku.cfg file on my buildout pakcage. This heroku file extends buildout.cfg with this parts for instance with relstorage :
20+
21+
```
22+
[instance]
23+
recipe = plone.recipe.zope2instance
24+
relative-paths = true
25+
eggs +=
26+
RelStorage
27+
psycopg2
28+
29+
rel-storage =
30+
keep-history false
31+
blob-dir /tmp/blobcache
32+
shared-blob-dir false
33+
type postgresql
34+
host PG_HOST
35+
dbname PG_DBNAME
36+
user PG_USER
37+
password PG_PASS
38+
```
39+
40+
I already have a free account on Heroku, so I simply push my heroku branch and the build pack automaticaly added a postgres plugin, start buildout with heroku.cfg... And it was online.
41+
42+
In my policy, I used and install these packages:
43+
44+
- sc.social.like
45+
- collective.contentrules.yearmonth
46+
- plonetheme.bootstrap
47+
- plone.formwidget.captcha
48+
49+
I still have little work to do as
50+
- change logo
51+
- improve comments
52+
- improve rss feed view (not only title and description into rss feed)
53+
Now you have no more excuse for creating your personnal blog with plone for improving Plone communication and community !
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
layout: post
3+
title: "Plone and Docker"
4+
date: 2015-01-27 18:32:57 +0200
5+
tags: Docker Python Plone
6+
---
7+
8+
*In this post, I will try to explain how we put Plone sites into production in our organization ([iMio](https://www.imio.be), Belgium).*
9+
10+
## Introduction
11+
For this process, we used some software as Puppet, Jenkins, but the process we use should be agnostic from these softwares.
12+
13+
Short story: when a push is made on Github, Jenkins builds a new image for Docker, pushes this image into a private Docker registry and updates the Docker image on server.
14+
15+
![CD - simple.png](<img/CD - simple.png>)
16+
17+
18+
## Docker images
19+
We create Docker images with [packer](https://www.packer.io/). We build .deb files with buildout, mr.bob and Jenkins. We create “debian” folder used to .deb files creation with a mr.bob template. We create 3 deb files:
20+
- plone-core-${version}.deb: contains eggs
21+
- plone-zeoserver-${version}.deb: contains zeoserver config files
22+
- plone-instance-${version}.deb: contains instance config files
23+
24+
After creation of deb files, packer uses (and installs) those deb files to create 2 Docker images:
25+
- docker.private-registry.be/plone.zeoserver.be:latest
26+
- docker.private-registry.be/plone.instance.be:latest
27+
We think this is a good way to have good isolation.
28+
29+
Both images are based on a "base IMIO image". Our base image is based on ubuntu image from docker hub. Each image has a size of +/- 530 MB because we have a lot of plone eggs in our buildout/plone site.
30+
31+
You could also create a simple Dockerfile which pulls a github repo and runs buildout to create your Docker image.
32+
33+
Once Packer has built the Docker images, Jenkins pushes them into a private Docker registry.
34+
35+
## Private registry
36+
For this post, I imagine we have a private docker registry in this url: docker.private-registry.be.
37+
38+
We use private registry to store our images.
39+
40+
Our images are created with tag latest and YYYYMMDD-JENKINS_JOB_NUMBER (20150127-97)
41+
We use a private registry for each environment, (staging, production, …) and we copy images between environments. Actually, we automatically update dev and staging environments and when we see there are no problem, we copy images on production.
42+
43+
## Update production
44+
We use fig to orchestrate our docker containers (zeo server must be started before zeo clients). We use a script to update our docker images. This script checks if the currently running docker containers use the latest image. If not, the script downloads the latest image, stops the docker containers which are running, remove them and restart containers from new images (we use upstart scripts to starting docker daemon).
45+
46+
```
47+
cd /fig/directory;fig pull > /dev/null 2>&1
48+
NAME='plone'
49+
REGISTRY_URL='docker.private-registry.be'
50+
INSTANCE="instance"
51+
ZEO="zeo"
52+
INSTANCE_NAME="instance_1"
53+
INSTANCE_IMAGE="$REGISTRY_URL/$INSTANCE"
54+
ZEO_IMAGE="$REGISTRY_URL/$ZEO"
55+
56+
LATEST_INSTANCE_IMAGE_ID=$(docker images | grep $INSTANCE_IMAGE | grep latest | awk '{print $3}')
57+
LATEST_ZEO_IMAGE_ID=$(docker images | grep $ZEO_IMAGE | grep latest | awk '{print $3}')
58+
59+
TAG_INSTANCE_IMAGE_ID=$(docker images | grep $LATEST_INSTANCE_IMAGE_ID | grep -v latest | awk '{print $2}')
60+
TAG_ZEO_IMAGE_ID=$(docker images | grep $LATEST_ZEO_IMAGE_ID | grep -v latest | awk '{print $2}')
61+
62+
if [ "$TAG_INSTANCE_IMAGE_ID" != "$TAG_ZEO_IMAGE_ID" ];then
63+
echo "Error: instance and zeo images are no the same tag !" 1>&2
64+
exit 1
65+
fi
66+
RUNNING=$(docker ps | grep $INSTANCE_NAME | awk '{print $2}')
67+
LATEST="$INSTANCE_IMAGE:$TAG_INSTANCE_IMAGE_ID"
68+
if [ "$RUNNING" != "$LATEST" ];then
69+
echo "restarting $NAME"
70+
stop $NAME
71+
start $NAME
72+
else
73+
echo "$NAME up to date"
74+
fi
75+
```
76+
77+
## Storage and backup
78+
We use [Docker data containers](https://docs.docker.com/userguide/dockervolumes/#creating-and-mounting-a-data-volume-container) (called storage in our case) for filestorage, blobstorage and backup folders. We start docker container with --volumes-from option. We have to be carefull to NEVER delete a storage container (maybe we have to improve docker for that).
79+
80+
We configure our buildouts to backup all data into var/backups folder and so, we launch docker with --volumes-from and -v options for backup and restore. Thanks to -v options, backups are stored on server and not in Docker. Later, backups are synced to our backup server.
81+
82+
With this zeo docker image, it’s easy to backup, pack and restore zodb. In the futur, we envision using relstorage instead of zeoserver. But currently, there is no DB admin in the company (hint to our boss ?).
83+
84+
## Conclusion
85+
Docker runs great in production !
86+
87+
I intend to follow [docker machine](https://github.com/docker/machine), [docker swarm](https://github.com/docker/swarm/) and docker compose.
88+
89+
Thank you to my colleagues Cédric de Wilde and Jean-François Roche for having worked with me to setup our production Plone into Docker.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: post
3+
title: "How I made my wedding site"
4+
date: 2015-03-27 14:31:57 +0200
5+
tags: Python Django Pyramid Mezzanine Cartridge Plone
6+
---
7+
8+
*I decide to make a website for my wedding with a list of gift, my honneymoon, presentation of my witnesses and so on.*
9+
10+
I was looking for a litlle CMS with a "list of gift" (an online shopping) which can be installed on cheap and reliable hosting (And it's when I loose Plone)
11+
12+
## Pyramid vs Django
13+
I started looking on Pyramid (because I'm a Plone/Zope dev). I thought [Kotti](http://kotti.pylonsproject.org/), but I didn't find a way to make easily gift, and I thougt project looks cool, but it'was maybe a little young for my kind of requirements. I didn't find good solution on pyramid for a wedding list.
14+
15+
Such as I have some exprience in [Django](https://www.djangoproject.com/), And in my daily work, we started intereset on [Geonode](http://geonode.org/) for GIS project.
16+
17+
-> I started looking on Django !
18+
19+
## Django CMS vs Mezzanine
20+
[Django CMS](https://www.django-cms.org/) and [Django CMS e-commerce plugin](https://www.django-cms.org/en/e-commerce/). But it seems this project is a almost dead ? [Last commit on github](https://github.com/divio/django-shop/commits/master) make me septic.
21+
22+
With little search, I found [Mezzanine](http://mezzanine.jupo.org/docs/index.html) and [Cartridge](http://cartridge.jupo.org/). I try it and It seems perfect for my porject, So I choose it !
23+
24+
## Hosting
25+
My first choose was OVH, because it's very cheap (5€ / month). But with little search, it is almost impossible to create a complex Django site (by complex, I mean a "Mezzanine" Django site, and it's not very complex). I pursued my searching... And I found Webfaction. They have local pythons, postgres, 600Go data for 10 € / month. It looks perfect for me, except they do not manage domain name directly. So I host my wedding site on webfaction and my domain name on OVH.1
26+
27+
Maybe I could made an heroku Django website, but I was little affraid about complexity.
28+
29+
30+
31+
Next step is to create an online shop with Kotti or with Pyramid !

0 commit comments

Comments
 (0)