Home

Documentation for mel.vin services.

GitLab Pages

https://git.mel.vin/help/user/project/pages/index.md

Published pages end up at user.doc.mel.vin/project, so gitlab.io always turns into doc.mel.vin. This is for for static, public documentation. Do not use this service for anything secure, sync to your own host instead.

Shared rsyncable host for per-branch review

Note

Due to a limitation in rsync, I have to manually create your top-level namespace first. Otherwise you will get No such file or directory from rsync when deploying.

Note

Keep whatever you do inside your own namespace ~/user/... and ~/group/....

https://git.mel.vin/help/ci/review_apps/index.md

With the supplied secret you can call rsync to the root of doc.mel.vin. Usually you would have subdirectories per branch for review apps.

For example you could have: doc.mel.vin/intel/cpu/fix-theoretical-bug.

Because the shared secret gives access to the root of the domain this service is inherently insecure. Do not use this service for anything secure, use your own infrastructure instead.

Also note that only plain, static HTML is supported. There is no support for PHP, CGI or any other type of executable. Use your own infrastructure, usually Docker or Kubernetes based, if you need actual application support.

The secret doc.mel.vin can be found at https://git.mel.vin/doc/secret.

Example as used in C template

Note

View https://git.mel.vin/template/c for the result in action.

  1. ssh-keyscan mel.vin to pin the keys, they can also be found below. If these do not match you are probably being MITMed.
# mel.vin:22 SSH-2.0-OpenSSH_7.6
mel.vin ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDB4yjksOJlZPdZPtfnnPOyd4ShaMDuT0eSLNEBawMmotli8d/BU6Ms5APQj6BvUGP2qGjsLPadl99TUxIRTKmHbhyngwBSyn5Ih1pdXC9HkP+PPMdGA9lpeem4QrhDD4bNh0gvHnsqqKoRzi4MFt33guJs1xHm2mwXqWOYWnxNi2a6enJE1rUXcFs3je1mTs4bL8lSrZhM09MJlSmOMslptl4HQIT7wWzmPwGV0f82Ya46oQfxVAHRzsRtwJxMKcqQvPl3GUVNLFaIm4HFB1trHFuuL/0cYgP2SfxU6kl6hzTYGEbzZLrH4QIAMAqtxQRVvDnKqMxpymCL/RtpBA5INvwsE51fSCMooDatU+EE3QvUkXLYwhjMInl05oa0X0C8tPzIYxGNrToClZmdhe4MQTe1Kin1u0HUBBBBYW0wP8J7fAFFcxckC08VIwkuTUZzckU8LKe9mgG4mu3G8A+Ku+XxpJEL+g+azQg4d9Dx8qMtUTCqlAKE08gZ76fQCYpO/cRYklHB8yPYniEkZSNP1hMadtDdi0QjVnnbyB5qk67FxfyDiIhis7zQhzjPlDhB/vnGg0IExGqF7/NZoi+p2uWvQbuLCWoVJsguGo4F3HzBZOtNnCGBl5iICB1bdsjm24Ms0N5fMLKBIVeyxw5u4DrPwpYJS3wM/mOnHALOFw==
# mel.vin:22 SSH-2.0-OpenSSH_7.6
mel.vin ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNAvLJriHej79OLBLQ8L2kk7+huWJwnbpIqGRZJxLcxuKtv7Bplk8KCgYN8i0oSwmMW2So4VCT7GI7Ct0/HUsGE=
# mel.vin:22 SSH-2.0-OpenSSH_7.6
mel.vin ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOS+hpNuh5HsTXYJDjI+A5TXhxgsXECbda6UlbOgJQPr
  1. Copy the full output of ssh-keyscan into a new secret variable. I’d name it DOC_SSH_KNOWNHOSTS.
  2. Copy the doc.mel.vin secret into another secret variable. Below it is named DOC_SSH_KEY.

Tip

Use rsync --dry-run while testing.

  1. Run the following commands in either the CI YAML or some script to deploy:
mkdir -p ~/.ssh
echo "$DOC_SSH_KNOWNHOSTS" > ~/.ssh/known_hosts
eval $(ssh-agent)
echo "$DOC_SSH_KEY" | ssh-add - >/dev/null

rsync -a --delete build/html/ doc@mel.vin:~/group/project/branch
  1. For clean-up operations, e.g. when the branch is removed, it is slightly complicated. You want to remove only the target directory and you must use rsync because everything else is blocked. So you would use:
mkdir -p ~/.ssh
echo "$DOC_SSH_KNOWNHOSTS" > ~/.ssh/known_hosts
eval $(ssh-agent)
echo "$DOC_SSH_KEY" | ssh-add - >/dev/null

mkdir /tmp/empty
rsync -a --delete --filter='+ branch' --filter='-,p *' \
        /tmp/empty/ doc@mel.vin:~/group/project
rmdir /tmp/empty

Some useful pages: