clacke / kevin-deldycke-blog

:notebook: My blog, based on Pelican.

Home Page:https://kevin.deldycke.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kevin Deldycke's blog

These are the source files of the content of my blog, which is powered by Pelican, a static site generator written in Python.

The theme it uses is called Plumage.

Installation

Fetch a copy of the repository:

$ git clone --recursive https://github.com/kdeldycke/kevin-deldycke-blog.git
$ cd ./kevin-deldycke-blog

To fetch and/or reset submodules to their commited reference:

$ git submodule update --init --recursive

Install dependencies:

$ pip install --upgrade -r ./requirements.txt

Development

Update to latest submodules:

$ git submodule init
$ git submodule update --remote --merge

In one terminal, run:

$ fab regenerate

And in another:

$ fab serve

Then go to http://localhost:8000.

Deployment

Prepare site for publishing:

$ pelican ./content -o ./output -s ./publishconf.py --verbose

Setup AWS CLI:

$ aws configure
AWS Access Key ID [None]: (...)
AWS Secret Access Key [None]: (...)
Default region name [None]:
Default output format [None]:

$ cat ~/.aws/credentials
[default]
aws_access_key_id = (...)
aws_secret_access_key = (...)

$ cat ~/.aws/config
[default]

Create the destination bucket if it doesn't exist yet:

$ aws s3 mb s3://kevin.deldycke.com

Setup bucket:

$ aws s3 website s3://kevin.deldycke.com --index-document index.html --error-document 500-error/index.html

Upload content to S3 bucket (full documentation):

$ aws s3 sync ./output s3://kevin.deldycke.com --delete --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=emailaddress=kevin@deldycke.com

And to check metadata, for the index.html file at the root for example:

$ aws s3api head-object --bucket kevin.deldycke.com --key index.html

Register and install a new Let's Encrypt certificate:

$ AWS_ACCESS_KEY_ID="(...)" AWS_SECRET_ACCESS_KEY="(...)" certbot --agree-tos -a certbot-s3front:auth --certbot-s3front:auth-s3-bucket kevin.deldycke.com -i certbot-s3front:installer --certbot-s3front:installer-cf-distribution-id (...) -d kevin.deldycke.com --config-dir ./letsencrypt --logs-dir ./letsencrypt/logs --work-dir ./letsencrypt --non-interactive --email kevin@deldycke.com
Saving debug log to ./letsencrypt/logs/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for kevin.deldycke.com
Found credentials in environment variables.
Calling s3:put_object with {'Body': u'(...)', u'Bucket': 'kevin.deldycke.com', 'Key': u'.well-known/acme-challenge/(...)', 'ACL': 'public-read'}
Starting new HTTPS connection (1): s3.amazonaws.com
Waiting for verification...
Cleaning up challenges
Starting new HTTPS connection (1): s3.amazonaws.com
Generating key (2048 bits): ./letsencrypt/keys/0000_key-certbot.pem
Creating CSR: ./letsencrypt/csr/0000_csr-certbot.pem
Non-standard path(s), might not work with crontab installed by your operating system package manager
Starting new HTTPS connection (1): iam.amazonaws.com
Starting new HTTPS connection (1): cloudfront.amazonaws.com
An error occurred (NoSuchEntity) when calling the DeleteServerCertificate operation: The Server Certificate with name le-kevin.deldycke.com cannot be found.

-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://kevin.deldycke.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=kevin.deldycke.com
-------------------------------------------------------------------------------

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   ./letsencrypt/live/kevin.deldycke.com/fullchain.pem.
   Your cert will expire on 2017-04-10. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you lose your account credentials, you can recover through
   e-mails sent to kevin@deldycke.com.
 - Your account credentials have been saved in your Certbot
   configuration directory at
   ./letsencrypt. You should
   make a secure backup of this folder now. This configuration
   directory will also contain certificates and private keys obtained
   by Certbot so making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

To renew the cert, you just need to re-run the command above.

TODO

Content

Theme

License

The content of this repository is copyrighted (c) 2004-2017 Kevin Deldycke.

Unless contrary mention, the content of this repository is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

About

:notebook: My blog, based on Pelican.

https://kevin.deldycke.com

License:Other


Languages

Language:HTML 76.1%Language:Python 23.9%