-
Notifications
You must be signed in to change notification settings - Fork 0
Initial AWS configuration
Again, if the site is already set up, you will not have to do this. But if you do have to set up a new AWS instance to run Drupal, maybe this can help you.
Source: https://aws.amazon.com/getting-started/hands-on/deploy-drupal-with-amazon-rds
- Create RDS instance, MariaDB engine 20GB storage on general purpose SSD
- Create EC2 instance, Amazon Linux 2023 image, 30GB storage on general purpose SSD
-
Install mariadb105-server
-
Set MySQL host name
export MYSQL_HOST=RDS_END_POINT
-
Login to RDS instance from EC2 with (RDS password is in 1Password)
mysql -P DB_PORT -u RDS_USER_NAME -p DB_NAME
-
Create new database user
CREATE USER 'DB_USER_NAME' IDENTIFIED BY PASSWORD_IN_1PASSWORD; GRANT ALL PRIVILEGES ON DB_NAME.* TO DB_USER_NAME; FLUSH PRIVILEGES; Exit
-
Install Apache on EC2 (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Tutorials.WebServerDB.CreateWebServer.html)
sudo dnf install -y httpd php php-mysqli
sudo nano /etc/httpd/conf/httpd.conf
-
Install Git on EC2
sudo dnf install git
-
Adjust folder permissions (https://askubuntu.com/a/767534)
sudo chgrp -R apache /PATH_TO_DOCUMENT_ROOT sudo find /PATH_TO_DOCUMENT_ROOT -type d -exec chmod g+rx {} + sudo find /PATH_TO_DOCUMENT_ROOT -type f -exec chmod g+r {} +
sudo chown -R ec2-user /PATH_TO_DOCUMENT_ROOT sudo find /PATH_TO_DOCUMENT_ROOT -type d -exec chmod u+rwx {} + sudo find /PATH_TO_DOCUMENT_ROOT -type f -exec chmod u+rw {} +
-
Test if you can create a simple index.php file to display [php.info](http://php.info), for example
-
Git clone repository
git clone https://github.com/interledger/interledger.org-v4.git
-
Move all files and folder out into the /var/www/html folder and delete the original folder
mv -f /PATH_TO_DOCUMENT_ROOT/interledger.org-v4/{.,}* /PATH_TO_DOCUMENT_ROOT rm -rf interledger.org-v4/
-
Test database connection from EC2 (password in 1Password)
mysql DB_NAME -u admin -h RDS_END_POINT
-
Connect DB to Drupal instance
mkdir sites cd sites mkdir default cd default touch settings.php
-
Check connection is successful using
drush
./vendor/bin/drush status
-
Upload database from latest local dump
scp -i "PATH_TO_PEM_FILE" DB_DUMP.sql ec2-user@EC2_PUBLIC_DNS:/PATH_TO_DOCUMENT_ROOT
-
Restore database with
drush
./vendor/bin/drush sql-cli < DB_DUMP.sql
-
Check site is running at http://EC2_PUBLIC_DNS/ or http://EC2_IP_ADDRESS/ (Note: Must be http at this point)
-
Upload the
files
folder backup (should clean out the OS files first)scp -i "PATH_TO_PEM_FILE" files.zip ec2-user@EC2_PUBLIC_DNS:/PATH_TO_DOCUMENT_ROOT/web/sites/default
-
Unzip files folder and cleanup
unzip files.zip
-
Update permissions so Apache can access the files (run at
web
folder)sudo chown -R ec2-user:apache .
-
Check the Status Report page and resolve all errors displayed
-
- Home
- Recurring tasks
- Local site development
- State of interledger.org
- One-time setup notes