eQualityTime / Public

1 stars 0 forks source link

Move the OVF stack to AWS #148

Closed joereddington closed 2 years ago

joereddington commented 2 years ago

As per #139 - we are gradually moving services from Dreamhost to Amazon web services. WWW is broadly complete, so it's time to start moving OVF.

Thinking about this.

I'm migrating three things.

(B) Clone the main code and run the tests. (C) Set up with a different Domain name - Novareddington.com is legit.

Steps

joereddington commented 2 years ago

13/01/22 10:39 to 11:55, Working on https://github.com/eQualityTime/Public/issues/148 +EQT

Moving OVF to AWS

Sprint stack:

Done installing documentation for unicode-display_width, terminal-table, safe_yaml, rouge, forwardable-extended, pathutil, mercenary, liquid, rexml, kramdown, kramdown-parser-gfm, ffi, rb-inotify, rb-fsevent, listen, jekyll-watch, sassc, jekyll-sass-converter, concurrent-ruby, i18n, http_parser.rb, eventmachine, em-websocket, colorator, public_suffix, addressable, jekyll after 46 seconds 27 gems installed Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2 Ignoring io-console-0.4.6 because its extensions are not built. Try: gem pristine io-console --version 0.4.6 Ignoring json-2.0.4 because its extensions are not built. Try: gem pristine json --version 2.0.4 Ignoring openssl-2.0.9 because its extensions are not built. Try: gem pristine openssl --version 2.0.9 Ignoring psych-2.2.2 because its extensions are not built. Try: gem pristine psych --version 2.2.2 jekyll 4.2.1 | Error: Permission denied @ dir_s_mkdir - /usr/share/nginx/html/myblog [ec2-user@ip-172-31-34-189 html]$

Nope, tried those commands and got nothing

NA: ssh into old server and see if the jekyll commands are available

joereddington commented 2 years ago

[ec2-user@jekyll ~]$ history 1 sudo yum install git 2 ls 3 pwd 4 git clone https://github.com/joereddington/dotvimdirectory 5 mv dotvimdirectory/ .vim 6 ls 7 cp .vim/vimrc .vimrc 8 vim hope.txt 9 cd .vim/ 10 ls 11 cd bundle/ 12 ls 13 cd .. 14 more setup.sh 15 cd .. 16 rm .vimrc 17 cd .vim/ 18 ./setup.sh 19 ls 20 sudoedit vimrc 21 cd .. 22 ls 23 sudo -E vim vimrc 24 ls 25 sudo -E vim hope.txt 26 git 27 pwd 28 ls 29 rm hope.txt 30 sudo apt-get install nginx 31 sudo yum install nginx 32 sudo amazon-linux-extras install nginx1 33 cd /usr/share/nginx/html/ 34 ls 35 more index.html 36 pwd 37 sudo vim /etc/nginx/nginx.conf 38 sudo systemctl status nginx.service 39 sudo systemctl start nginx.service 40 sudo systemctl status nginx.service 41 ls -lt 42 sudo chmod 777 index.html 43 sudo git clone https://github.com/equalityTime/TheOpenVoiceFactory-site/ 44 ls 45 jekyll 46 history 47 history >historysofar.txt 48 sudo history >historysofar.txt 49 history >~/historysofar.txt 50 sudo yum install ruby 51 sudo vim jeykllinstall.sh 52 sudo chmod a+x jeykllinstall.sh 53 ./jeykllinstall.sh 54 pwd 55 ls 56 cd TheOpenVoiceFactory-site/ 57 jekyll build 58 gem pristine bigdecimal --version 1.3.2 59 sudo gem pristine bigdecimal --version 1.3.2 60 sudo jekyll build 61 jekyll build 62 sudo gem pristine io-console --version 0.4.6 63 sudo gem pristine json --version 2.0.4 64 jekyll build 65 sudo gem pristine psych --version 2.2.2 66 jekyll build 67 sudo gem pristine openssl --version 2.0.9 68 jekyll build 69 bundle exec jekyll build 70 sudo bundle exec jekyll build 71 bundle install 72 sudo bundle install 73 cd .. 74 jekyll new myblog 75 sudo jekyll new myblog 76 exit 77 history

joereddington commented 2 years ago

There are the missing ifles /root/.bash_history:sudo jekyll build /root/.bash_history:sudo gem install jekyll bundler /root/.bash_history:sudo bundle exec jekyll build /root/.bash_history:jekyll build /root/.bash_history:gem install jekyll bundler /root/.bash_history:gem install jekyll /root/.bash_history:gem install jekyll /root/.bash_history:bundle exec jekyll build /home/ec2-user/.bash_history:sudo jekyll build /home/ec2-user/.bash_history:sudo bundle exec jekyll build /home/ec2-user/.bash_history:jekyll build /home/ec2-user/.bash_history:bundle exec jekyll build

But none of them worked.

Part of the problem was that the ruby version was too low. I bumped it up to 3 with.

sudo amazon-linux-extras install ruby3.0

but that still didn't work until I did. something else that seemed normal. It's now building. Here's the rest of the commands? 163 cd TheOpenVoiceFactory-site/ 164 ls 165 touch hope.txt 166 jeykll build 167 jekyll build 168 bundle exec jekyll build 169 bundle install 170 sudo gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/' 171 bundle install 172 ls 173 vim Gemfile 174 rm Gemfile.lock 175 jekyll build 176 gem install ffi 177 sudo gem install ffi 178 sudo amazon-linux-extras install ruby-dev 179 sudo amazon-linux-extras list | grep ruby 180 gem install aws-skd 181 gem install aws-sdk 182 sudo gem install ffi 183 jekyll build 184 gem pristine ffi --version 1.15.5 185 sudo gem pristine ffi --version 1.15.5 186 gem uninstall ffi 187 gem uninstall -i ffi 188 sudo gem uninstall ffi 189 sudo gem pristine ffi --version 1.15.5 190 sudo gem pristine ffi 191 sudo gem install ffi 192 ruby 193 sudo yum install ruby-devel 194 sudo gem install ffi 195 jekyll build 196 bundle install 197 jekyll build 198 bundle exec jekyll build 199 ls 200 ls _site/ 201 ls 202 history

joereddington commented 2 years ago

I'm setting up Novareddington.com as a test.

To register a domain on Amazon.

joereddington commented 2 years ago

02/02/22 12:23 to 16:45, Work on https://github.com/eQualityTime/Public/issues/148 +EQT

Doing Https

IMPORTANT NOTES:

[ec2-user@jekyll ~]$

I used the /usr/share/nginx/html/TheOpenVoiceFactory-site/_site webroote

I had to follow lots of advice on this page: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html

Here's the commands I used:

439 02/02/22 16:04:35 sudo wget -r --no-parent -A 'epel-release-.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/ 440 02/02/22 16:04:42 sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-.rpm 441 02/02/22 16:04:48 sudo yum-config-manager --enable epel* 442 02/02/22 16:04:53 sudo yum repolist all 443 02/02/22 16:05:14 sudo amazon-linux-extras install epel -y 444 02/02/22 16:05:38 sudo yum install -y certbot python2-certbot-apache 454 02/02/22 16:06:18 sudo certbot certonly

joereddington commented 2 years ago

It is moved.

09/05/22 06:14 to 07:31, Work on OVF migration +EQT

09/05/22 09:58 to 10:15, Working out day +EQT

IMPS3 and meeting are the things I'm excited abut but...

09/05/22 10:15 to 10:50, +EQT migration of OVF

/usr/share/nginx/html/TheOpenVoiceFactory-site/_site

Which worked and I got this

IMPORTANT NOTES:

09/05/22 10:51 to 11:55, +EQT migration of OVF