Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CT for new blog engine #80

Open
Tracked by #362
CharlesNepote opened this issue Dec 24, 2021 · 0 comments
Open
Tracked by #362

CT for new blog engine #80

CharlesNepote opened this issue Dec 24, 2021 · 0 comments

Comments

@CharlesNepote
Copy link
Member

CharlesNepote commented Dec 24, 2021

[All the following limits (RAM, CPU, storage) can be dynamically adjusted later.]

OS

Debian stable.

Local disk space

10 GB
On a Proxmox CT, a fresh Wordpress installation takes 1.5 GB.
Current fr.blog.openfoodfacts.org represent ~110M (including photos):

httrack -O ./ -z -%v -A200000 -s0 -x -B -%P -%q0 -w "https://fr.blog.openfoodfacts.org"
du -sh ./
106M

en.blog.openfoodfacts.org represent ~20M.

Shared disk space

--

RAM

2 GB.

Nb of CPU

3 CPU.

Main software bricks

LAMP + wordpress.

Reverse proxy

test-blog.openfoodfacts.org

Usage

Test blog to evaluate blog migration.

Machine administrators

https://github.com/CharlesNepote.keys

This will be the production machine. All tests will be made on a staging machine based on proxmox cloning:

pct snapshot 140 temp # create a "temp" named snapshot of CT with ID 140 (production)
pct shutdown 141 # shutdown 141 machine
pct destroy 141 # delete target machine
pct clone 140 141 --hostname wp-staging --snapname temp # take the snapshot and create a new CT (141) named wp-staging
pct delsnapshot 140 temp # del production snapshot
# New CT configuration
pct set 141 --cores 2 --memory 1024 --net0 name=eth0,bridge=vmbr0,gw=10.0.0.1,ip=10.1.0.141/24
pct start 141
lxc-attach -n 141 -- sudo -H -u www-data bash -c "wp option update home 'https://test-blog.openfoodfacts.org' --path=/var/www/html"
lxc-attach -n 141 -- sudo -H -u www-data bash -c "wp option update siteurl 'https://test-blog.openfoodfacts.org' --path=/var/www/html"

Machine configuration

# From a fresh Debian 11 installation
apt update
apt upgrade
apt install sqlite3 htop iftop recode screen git wget curl lynx sudo
apt install apache2 libapache2-mod-fcgid
apt install php-{fpm,cli,curl,gd,imagick,imap,json,mbstring,mysql,xml,zip} mariadb-server
a2enconf php7.4-fpm
a2enmod proxy_fcgi setenvif
systemctl restart apache2
a2enmod deflate # allow gzip compression
a2enmod rewrite # activate mod_rewrite module (needed by many CMS (wordpress, mediawiki...))
systemctl restart apache2
systemctl status mariadb
systemctl enable mariadb
mysql_secure_installation

# Modify php.ini:
# upload_max_filesize = 50M

systemctl restart php7.4-fpm.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants