-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,190 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
permalink: /404.html | ||
layout: default | ||
--- | ||
|
||
<style type="text/css" media="screen"> | ||
.container { | ||
margin: 10px auto; | ||
max-width: 600px; | ||
text-align: center; | ||
} | ||
h1 { | ||
margin: 30px 0; | ||
font-size: 4em; | ||
line-height: 1; | ||
letter-spacing: -1px; | ||
} | ||
</style> | ||
|
||
<div class="container"> | ||
<h1>404</h1> | ||
|
||
<p><strong>Page not found :(</strong></p> | ||
<p>The requested page could not be found.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
source "https://rubygems.org" | ||
# Hello! This is where you manage which Jekyll version is used to run. | ||
# When you want to use a different version, change it below, save the | ||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: | ||
# | ||
# bundle exec jekyll serve | ||
# | ||
# This will help ensure the proper Jekyll version is running. | ||
# Happy Jekylling! | ||
gem "jekyll", "~> 4.3.2" | ||
# This is the default theme for new Jekyll sites. You may change this to anything you like. | ||
gem "minima", "~> 2.5" | ||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and | ||
# uncomment the line below. To upgrade, run `bundle update github-pages`. | ||
# gem "github-pages", group: :jekyll_plugins | ||
# If you have any plugins, put them here! | ||
group :jekyll_plugins do | ||
gem "jekyll-feed", "~> 0.12" | ||
end | ||
|
||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem | ||
# and associated library. | ||
platforms :mingw, :x64_mingw, :mswin, :jruby do | ||
gem "tzinfo", ">= 1", "< 3" | ||
gem "tzinfo-data" | ||
end | ||
|
||
# Performance-booster for watching directories on Windows | ||
# gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] | ||
|
||
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem | ||
# do not have a Java counterpart. | ||
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.8.5) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
colorator (1.1.0) | ||
concurrent-ruby (1.2.2) | ||
em-websocket (0.5.3) | ||
eventmachine (>= 0.12.9) | ||
http_parser.rb (~> 0) | ||
eventmachine (1.2.7) | ||
ffi (1.16.1) | ||
forwardable-extended (2.6.0) | ||
google-protobuf (3.24.3-x86_64-linux) | ||
http_parser.rb (0.8.0) | ||
i18n (1.14.1) | ||
concurrent-ruby (~> 1.0) | ||
jekyll (4.3.2) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
em-websocket (~> 0.5) | ||
i18n (~> 1.0) | ||
jekyll-sass-converter (>= 2.0, < 4.0) | ||
jekyll-watch (~> 2.0) | ||
kramdown (~> 2.3, >= 2.3.1) | ||
kramdown-parser-gfm (~> 1.0) | ||
liquid (~> 4.0) | ||
mercenary (>= 0.3.6, < 0.5) | ||
pathutil (~> 0.9) | ||
rouge (>= 3.0, < 5.0) | ||
safe_yaml (~> 1.0) | ||
terminal-table (>= 1.8, < 4.0) | ||
webrick (~> 1.7) | ||
jekyll-feed (0.17.0) | ||
jekyll (>= 3.7, < 5.0) | ||
jekyll-sass-converter (3.0.0) | ||
sass-embedded (~> 1.54) | ||
jekyll-seo-tag (2.8.0) | ||
jekyll (>= 3.8, < 5.0) | ||
jekyll-watch (2.2.1) | ||
listen (~> 3.0) | ||
kramdown (2.4.0) | ||
rexml | ||
kramdown-parser-gfm (1.1.0) | ||
kramdown (~> 2.0) | ||
liquid (4.0.4) | ||
listen (3.8.0) | ||
rb-fsevent (~> 0.10, >= 0.10.3) | ||
rb-inotify (~> 0.9, >= 0.9.10) | ||
mercenary (0.4.0) | ||
minima (2.5.1) | ||
jekyll (>= 3.5, < 5.0) | ||
jekyll-feed (~> 0.9) | ||
jekyll-seo-tag (~> 2.1) | ||
pathutil (0.16.2) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (5.0.3) | ||
rake (13.0.6) | ||
rb-fsevent (0.11.2) | ||
rb-inotify (0.10.1) | ||
ffi (~> 1.0) | ||
rexml (3.2.6) | ||
rouge (4.1.3) | ||
safe_yaml (1.0.5) | ||
sass-embedded (1.68.0) | ||
google-protobuf (~> 3.23) | ||
rake (>= 13.0.0) | ||
terminal-table (3.0.2) | ||
unicode-display_width (>= 1.1.1, < 3) | ||
unicode-display_width (2.4.2) | ||
webrick (1.8.1) | ||
|
||
PLATFORMS | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
http_parser.rb (~> 0.6.0) | ||
jekyll (~> 4.3.2) | ||
jekyll-feed (~> 0.12) | ||
minima (~> 2.5) | ||
tzinfo (>= 1, < 3) | ||
tzinfo-data | ||
|
||
BUNDLED WITH | ||
2.4.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Welcome to Jekyll! | ||
# | ||
# This config file is meant for settings that affect your whole blog, values | ||
# which you are expected to set up once and rarely edit after that. If you find | ||
# yourself editing this file very often, consider using Jekyll's data files | ||
# feature for the data you need to update frequently. | ||
# | ||
# For technical reasons, this file is *NOT* reloaded automatically when you use | ||
# 'bundle exec jekyll serve'. If you change this file, please restart the server process. | ||
# | ||
# If you need help with YAML syntax, here are some quick references for you: | ||
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml | ||
# https://learnxinyminutes.com/docs/yaml/ | ||
# | ||
# Site settings | ||
# These are used to personalize your new site. If you look in the HTML files, | ||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. | ||
# You can create any custom variable you would like, and they will be accessible | ||
# in the templates via {{ site.myvariable }}. | ||
|
||
title: Benoît Suttor's blog | ||
email: [email protected] | ||
description: >- # this means to ignore newlines until "baseurl:" | ||
This is a blog about my journey in IT. | ||
baseurl: "" # the subpath of your site, e.g. /blog | ||
url: "https://bsuttor.github.io/" # the base hostname & protocol for your site, e.g. http://example.com | ||
twitter_username: bensuttor | ||
github_username: bsuttor | ||
|
||
# Build settings | ||
theme: minima | ||
plugins: | ||
- jekyll-feed | ||
|
||
# Exclude from processing. | ||
# The following items will not be processed, by default. | ||
# Any item listed under the `exclude:` key here will be automatically added to | ||
# the internal "default list". | ||
# | ||
# Excluded items can be processed by explicitly listing the directories or | ||
# their entries' file path in the `include:` list. | ||
# | ||
# exclude: | ||
# - .sass-cache/ | ||
# - .jekyll-cache/ | ||
# - gemfiles/ | ||
# - Gemfile | ||
# - Gemfile.lock | ||
# - node_modules/ | ||
# - vendor/bundle/ | ||
# - vendor/cache/ | ||
# - vendor/gems/ | ||
# - vendor/ruby/ |
53 changes: 53 additions & 0 deletions
53
_posts/2014-12-22-how-i-created-my-blog-with-heroku-and-plone.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
layout: post | ||
title: "How I created my blog with Heroku and Plone" | ||
date: 2014-12-22 20:31:57 +0200 | ||
tags: Heroku Python Plone | ||
--- | ||
|
||
*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).* | ||
|
||
|
||
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: | ||
|
||
- blog.post | ||
- blog.policy | ||
|
||
|
||
And I also create a [buildout](https://github.com/bsuttor/blog.buildout). | ||
|
||
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 : | ||
|
||
``` | ||
[instance] | ||
recipe = plone.recipe.zope2instance | ||
relative-paths = true | ||
eggs += | ||
RelStorage | ||
psycopg2 | ||
rel-storage = | ||
keep-history false | ||
blob-dir /tmp/blobcache | ||
shared-blob-dir false | ||
type postgresql | ||
host PG_HOST | ||
dbname PG_DBNAME | ||
user PG_USER | ||
password PG_PASS | ||
``` | ||
|
||
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. | ||
|
||
In my policy, I used and install these packages: | ||
|
||
- sc.social.like | ||
- collective.contentrules.yearmonth | ||
- plonetheme.bootstrap | ||
- plone.formwidget.captcha | ||
|
||
I still have little work to do as | ||
- change logo | ||
- improve comments | ||
- improve rss feed view (not only title and description into rss feed) | ||
Now you have no more excuse for creating your personnal blog with plone for improving Plone communication and community ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
layout: post | ||
title: "Plone and Docker" | ||
date: 2015-01-27 18:32:57 +0200 | ||
tags: Docker Python Plone | ||
--- | ||
|
||
*In this post, I will try to explain how we put Plone sites into production in our organization ([iMio](https://www.imio.be), Belgium).* | ||
|
||
## Introduction | ||
For this process, we used some software as Puppet, Jenkins, but the process we use should be agnostic from these softwares. | ||
|
||
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. | ||
|
||
 | ||
|
||
|
||
## Docker images | ||
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: | ||
- plone-core-${version}.deb: contains eggs | ||
- plone-zeoserver-${version}.deb: contains zeoserver config files | ||
- plone-instance-${version}.deb: contains instance config files | ||
|
||
After creation of deb files, packer uses (and installs) those deb files to create 2 Docker images: | ||
- docker.private-registry.be/plone.zeoserver.be:latest | ||
- docker.private-registry.be/plone.instance.be:latest | ||
We think this is a good way to have good isolation. | ||
|
||
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. | ||
|
||
You could also create a simple Dockerfile which pulls a github repo and runs buildout to create your Docker image. | ||
|
||
Once Packer has built the Docker images, Jenkins pushes them into a private Docker registry. | ||
|
||
## Private registry | ||
For this post, I imagine we have a private docker registry in this url: docker.private-registry.be. | ||
|
||
We use private registry to store our images. | ||
|
||
Our images are created with tag latest and YYYYMMDD-JENKINS_JOB_NUMBER (20150127-97) | ||
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. | ||
|
||
## Update production | ||
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). | ||
|
||
``` | ||
cd /fig/directory;fig pull > /dev/null 2>&1 | ||
NAME='plone' | ||
REGISTRY_URL='docker.private-registry.be' | ||
INSTANCE="instance" | ||
ZEO="zeo" | ||
INSTANCE_NAME="instance_1" | ||
INSTANCE_IMAGE="$REGISTRY_URL/$INSTANCE" | ||
ZEO_IMAGE="$REGISTRY_URL/$ZEO" | ||
LATEST_INSTANCE_IMAGE_ID=$(docker images | grep $INSTANCE_IMAGE | grep latest | awk '{print $3}') | ||
LATEST_ZEO_IMAGE_ID=$(docker images | grep $ZEO_IMAGE | grep latest | awk '{print $3}') | ||
TAG_INSTANCE_IMAGE_ID=$(docker images | grep $LATEST_INSTANCE_IMAGE_ID | grep -v latest | awk '{print $2}') | ||
TAG_ZEO_IMAGE_ID=$(docker images | grep $LATEST_ZEO_IMAGE_ID | grep -v latest | awk '{print $2}') | ||
if [ "$TAG_INSTANCE_IMAGE_ID" != "$TAG_ZEO_IMAGE_ID" ];then | ||
echo "Error: instance and zeo images are no the same tag !" 1>&2 | ||
exit 1 | ||
fi | ||
RUNNING=$(docker ps | grep $INSTANCE_NAME | awk '{print $2}') | ||
LATEST="$INSTANCE_IMAGE:$TAG_INSTANCE_IMAGE_ID" | ||
if [ "$RUNNING" != "$LATEST" ];then | ||
echo "restarting $NAME" | ||
stop $NAME | ||
start $NAME | ||
else | ||
echo "$NAME up to date" | ||
fi | ||
``` | ||
|
||
## Storage and backup | ||
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). | ||
|
||
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. | ||
|
||
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 ?). | ||
|
||
## Conclusion | ||
Docker runs great in production ! | ||
|
||
I intend to follow [docker machine](https://github.com/docker/machine), [docker swarm](https://github.com/docker/swarm/) and docker compose. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
layout: post | ||
title: "How I made my wedding site" | ||
date: 2015-03-27 14:31:57 +0200 | ||
tags: Python Django Pyramid Mezzanine Cartridge Plone | ||
--- | ||
|
||
*I decide to make a website for my wedding with a list of gift, my honneymoon, presentation of my witnesses and so on.* | ||
|
||
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) | ||
|
||
## Pyramid vs Django | ||
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. | ||
|
||
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. | ||
|
||
-> I started looking on Django ! | ||
|
||
## Django CMS vs Mezzanine | ||
[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. | ||
|
||
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 ! | ||
|
||
## Hosting | ||
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 | ||
|
||
Maybe I could made an heroku Django website, but I was little affraid about complexity. | ||
|
||
|
||
|
||
Next step is to create an online shop with Kotti or with Pyramid ! |
Oops, something went wrong.