Closed joereddington closed 2 years ago
Spent a lot of today on this.
I have now an instance that correctly runs Driver. That includes
That's really good. It effectively entirely replaces the Dreamhost, once I point the domain name in the right place.
However I also went to a lot of effort to get etherpad working. Mostly via this https://www.rosehosting.com/blog/install-etherpad-on-a-centos-7-vps/ page, but also helped by https://stackoverflow.com/a/36340441/170243
I reached "verify the unit started, run journalctl -f -u etherpad.service and you should see something like below:" and very much didn't get that.
Tried https://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1/ but couldn't get that to work either...
Next step is to spin up another instance but without the custom code.
Did a sprint on this last night.
The problem with "verify the unit started, run journalctl -f -u etherpad.service and you should see something like below:" was that "sudo node" was accessing the wrong version of node.
I ran lots of slight variations of commands, including from this excellent youtube video (stuff at about 3:00) and got that working. I think the one that made the difference was 'sudo yum clean'
The next problem was that the '3000' port that I had opened was only for IP6, and I should have opened it for IP4 and IP6.
I used:
361 sudo fuser -k 80/tcp
362 sudo fuser -k 443/tcp
363 sudo service nginx restart
to stop the httpd server.
Finally, Nginx only started working after I put the config in /etc/nginx/conf.d/ and removed the 'homepage' bit from sudo vim /etc/nginx/nginx.conf The config that I ended up using was https://www.digitalocean.com/community/tutorials/how-to-install-the-etherpad-collaborative-web-editor-on-ubuntu-20-04
Yesterday's work:
journalctl -xe sudo nginx -t sudo systemctl restart etherpad.service sudo systemctl restart nginx sudo vim /etc/nginx/sites-available/etherpad.conf sudo vim /etc/systemd/system/etherpad.service sudo vim /var/log/nginx/etherpad.access.log sudo vim /var/log/nginx/etherpad.error.log ~
Maddeningly - the issue is now to get nginx to work with php.
server {
listen 80;
listen [::]:80;
server_name ec2-3-8-118-44.eu-west-2.compute.amazonaws.com;
access_log /var/log/nginx/etherpad.access.log;
error_log /var/log/nginx/etherpad.error.log;
index index.html index.htm index.php index.nginx-debian.html;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_index index.php;
}
location /watchtower {
root /var/www/html/;
}
location /{
root /var/www/html/whitewaterwriters-site/docs/;
}
location /etherpad {
proxy_pass http://127.0.0.1:3000;
rewrite /etherpad/(.*) /$1 break; #from https://serverfault.com/a/379679
proxy_buffering off;
proxy_set_header Host $host;
proxy_pass_header Server;
# proxy headers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
# websocket proxying
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
sudo yum install -y nginx php-fpm works for the php but NOT the nginx?
5 Google for nginx and jekyll (or try this: https://gist.github.com/rickharrison/6410194 )
7 Use the youtube link on a fresh install to work out the php of it all.
8 Back up the key somewhere
Okay next things are to set up etherpad (again) and finally fix the jeykll links.
Associated an elastic IP address.
Fix the jeykll links
Set up etherpad (again)
Setup cron on new server
Point the domain name at the right place
delete old server
Start developing the Orcele system
found various ways to install jekyll. None have worked so far.
Yekyll is a lot harder to install than it should be
I want it finnished by the end of the day so that I can hand it over to Richard.
But that doesn't include the evernote does it?
I've fixed (with commit) Jekyll - there were a few small bugs.
I've used to route traffic https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html
So what's the first thing to do?
Next morning I asked this quesiton: Okay, via a SE rubberducking here: https://serverfault.com/questions/1084322/how-to-fix-invalidinput-400-record-name-is-not-valid-for-hosted-zone-on-aw/1084325#1084325, I have a working domain name. and self answered it shortly afterwards. Still need to fix 'www.' and 'https::/'
This note belongs both here and in #140.
This is probably useful later:
Installing to: /usr/local/texlive/2021 o
It failed because of lack of space.
Later I used this command:
[ec2-user@ip-172-31-26-130 install-tl-20211129]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 484M 0 484M 0% /dev
tmpfs 492M 0 492M 0% /dev/shm
tmpfs 492M 412K 491M 1% /run
tmpfs 492M 0 492M 0% /sys/fs/cgroup
/dev/xvda1 8.0G 8.0G 11M 100% /
tmpfs 99M 0 99M 0% /run/user/1000
[ec2-user@ip-172-31-26-130 install-tl-20211129]$
To confirm usage was 100%
I've since increased the size of the volumne to 32gb, and once that has finnished I'll update.
IMPORTANT NOTES:
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
I think the next thing is to watch that youtube video again.
finished with package-specific postactions
Welcome to TeX Live!
See /usr/local/texlive/2021/index.html for links to documentation. The TeX Live web site (https://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at https://tug.org/usergroups.html.
Add /usr/local/texlive/2021/texmf-dist/doc/man to MANPATH. Add /usr/local/texlive/2021/texmf-dist/doc/info to INFOPATH. Most importantly, add /usr/local/texlive/2021/bin/x86_64-linux to your PATH for current and future sessions. Logfile: /usr/local/texlive/2021/install-tl.log
--- Okay, the important files definately exist in the relevent path --- So I try again
latex]$ /usr/local/texlive/2021/bin/x86_64-linux/tex4ebook book.tex /usr/local/texlive/2021/bin/x86_64-linux/tex4ebook:6: module 'lapp-mk4' not found: no field package.preload['lapp-mk4'] [kpse lua searcher] file not found: 'lapp-mk4' [kpse C searcher] file not found: 'lapp-mk4' [ec2-user@ip-172-31-26-130 latex]$
--- Damint okay,
export PATH="/usr/local/texlive/2021/bin/x86_64-linux:$PATH"
--- That solved the first error, but now I have:
[STATUS] tex4ebook: Conversion started [STATUS] tex4ebook: Input file: book.tex ...021/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua:105: attempt to index a nil value (local 'm')
Solved by changing the permissions...
However, now pdflatex doens't compile the pdf because it complains about the way that the file is downloaded. Sigh.
I've put vim on the server - that setup.sh was useful.
Editing update.py - this is a 300 line file!
Update.py fails with the new latex. So I'm going to make some changes
Update.py still fails (run it under sudo su so we aren't worried about paths for new latex
However, tex4ebook now produces a file, which is worth knowing about
Right now, the update.py needs to work with the next latex, and that means a MCVE to fix the strange error message that is:
Also check that the crontab has properly stopped, because I think that is interfering...
Grinding through - can't work out where these
Well, the ebook is getting produced
Strange marks at the end of chatpers
Man I don't know what to do.
Need to install and connect etherpad onto the current server.
Working on https://www.rosehosting.com/blog/install-etherpad-on-a-centos-7-vps/ and hit
I believe I extended the size of the partituion with these commands 1025 du -h 1026 df -h 1027 df -hT 1028 lsblk 1029 sudo growpart /devxvda 1 1030 sudo growpart /dev/xvda 1 1031 lsblk 1032 pwd 1033 df -h 1034 lsblk 1035 df -hT 1036 sudo xfs_growfs -d / 1037 df -hT
Installing dependencies again.
We're actually NOT that far from getting this done.
Oh hey, it's that 'one-time fix up'
I am at 'Install and configure Nginx' which is really nice, this was much faster than before.
06/01/22 smallest next step: Examine the nginx config that it wants.
I made some alterations to nginx
The www, https versions are working, as is watchtower, but the etherpad isn't quite there.
The issue now is that www.whitewaterwriters.com/etherpad is sort of working, but the not serving all the (javascript, css) files that would make it really work...
NA: is to write this up as an issue.
We're fixing a range of bugs in the new version of IMPS.
As a review - I think we are monitoring this for a couple of weeks and then hopefully closing it.
Closing.
Today I closed down the old crons, removed the ability to create camps and delated 19G of pdfs and tar files.
Bloggged (ish) at https://equalitytime.co.uk/6666/2022/07/28/infrastructure/
Dreamhost has been increasingly unpleasent to use.
We've been moving sites off there as and when we could: http://www.projectreal.co.uk/, https://www.whitewaterwriters.com/, OVF's homepage and Flowers for Turing are all hosted on Github
But there is code running in other places: OVF's code, the WWW driver, Supertitle, the blog lists, that prevent us from dropping Dreamhost completely.
There are also things that we want to do that I've been unable to do on Dreamhost (mostly WWW):
So here is what I want:
Resouces
Comands
Main ssh command:
Useful file locations Html files live at /usr/share/nginx/html
Config is at /etc/nginx/nginx.something
The code in the original instance:
Plan