Linux Apache MariaDB in the cloud

  Linux Apache MariaDB in the cloud


Contents

About LAM AWS

This Linux Apache MariaDB (LAM) instance is in the cloud on Amazon Web Services (AWS) servers. I currently run in the Oregon (US West 2 region) which is one of the cheapest regions for AWS pricing. The inclusion of support for the Perl, Python and PHP application programming languages makes this a LAMP model web service software stack instance.

The LAM AWS server instance was created to host my public named host websites and be a backup of the mediawiki installation and home grown perl database web interface on the secure side of my main server. These utilize a MariaDB server on the same machine. The server is also used as an ssh proxy for browsing the web.

This server instance is now running on a t3.nano instance under a no upfront cost 36 month reservation. The rate is less than $1.50 / month. This is a considerable savings over the On Demand $0.0052 per Linux t3.nano Instance Hour = $3.796 / Month ($0.0052*24*365/12) - $45.552 / Year pricing. The t3.nano instance 36 month reservation covers 1 EC2 instance but does not include any EC2 EBS storage which is required for the Ubuntu Server image used for the Operating System. I pay $0.80 for 8 GB-Mo of General Purpose SSD (gp2) which is the standard configuration for the Latest Ubuntu Server image. I pay $0.10 for 0.300 GB-Mo of storage on the AWS Elastic File System (EFS) at the USD $0.30 per GB-Mo for Standard storage (USW2) rate. The AWS EFS storage is among the most expensive but it is extremely convenient to have a persistent parallel file system that can be mounted with the Linux nfs4 package available during the Instance Initialization. I pay $4.00 / month for an additional 42 GB-Mo of General Purpose SSD (gp2) for the volume to mirror the /Zz directory.

aws.lam1.us sites.lam1.us

The LAM AWS server instance was designed to utilize a t2.micro EC2 instance which is part of the AWS Free Tier offering. That offering includes 750 Hours / month of a t2.micro Elastic Compute Cloud (EC2) instance which is enough to run one instance 24/7. The instance could scale up by using a larger and more capable server and other options or scale down to a t3.nano or other server sizes cheaper than a t2.micro except under the (AWS) Free Tier offering. Multiple groups of virtual hosts can all run on one server or a separate server can be used for each group or single host. Once the Free Tier was over the t2.micro server was found to cost less than $12.00 / month with the initial sizing and usage On Demand and less than $4.00 / month using a t3.nano EC2 instance reserved prepaid for 3 years. A t3.nano is even less expensive and passed testing supporting the web and proxy services by being my cloud host after t2.micro hours got more expensive. The server is mostly idle although memory usage runs at 75% on a t3.nano and nearly 50% on a t2.micro.

A single LAM AWS server instance can host multiple websites, including a secure website, with Apache2 on Linux and includes MariaDB, Perl, Python, PHP and other common development tools. Additional packages installed support running MediaWiki and more. The LAM AWS server is built on the latest Ubuntu Server Amazon Machine Image (AMI) with an EBS General Purpose (SSD) Volume. The resulting image is similar enough to the Linux Mint distribution I use on the newer machines at home and on my laptop so that cloning my MediaWiki and lam databases from the main server to either an aws instance or Linux Mint machine can be done with the same procedure.

LAM AWS resources

Use the default VPC for the AWS Region

The default VPC for the AWS Region default subnet in each Availability Zone provides up to 4,096 addresses per subnet, a few of which are reserved for AWS use. This gives the LAM AWS VPC it's own private address space (172.31.0.0/16) and each EC2 instance or an AWS Elastic File System resource gets an IP address within this space. The default VPC in each AWS Region also includes an attached internet gateway, a route in the main route table that sends all traffic to the internet gateway, and DNS settings that automatically assign public DNS hostnames to instances with public IP addresses and enable DNS resolution through the Amazon-provided DNS server.

Public IPv4 Address

AWS is going to start charging for Public IPv4 Address which will double the cost of it's smallest EC2 instances.

PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year

In 2023, when I found out AWS will begin charging for each public IPv4 address, I enabled a default IPv6 address from the 2600:1f14:3d86:2c00::/56 CIDR block for EC2 instance launched in my us-west-2 AWS LAM VPC and modified the aws-web-anywhere-alt-ssh-port Security Group to allow for IPv6 traffic. Because the ISP I use in Alaska does not yet support IPv6 and I don't know that any are available I must continue to use a Public IPv4 address for my main LAM AWS VPC EC3 instance.

Use a predefined security group

The security group definition controls the traffic within the Virtual Private Cloud and with the outside world. I use the same security group definition for all images with only a limited number of inbound ports open. The definition details are:

This security group definition allows web traffic on the standard ports from the public interface (0.0.0.0/0), Secure Shell on an alternate high numbered port and IMAPS on an alternate high numbered port. The security group definition allows Secure Shell on the standard port and NFS traffic only on the private interface (172.31.0.0/16) or the IPv6 CIDR block for the VPC. The SSH SOCKS5 Proxy instance uses the same security group definition but is accepting Secure Shell traffic on the port that is normally used for Secure Web (HTTPS) traffic. The security group definition does allow outgoing traffic from the server over the public interface over either IPv4 or IPv6.

Use a persistent parallel file system

A volume in the AWS Elastic File System (EFS) in my default USA NW Oregon region is used as a NFS mounted parallel file system. The security group definition allows traffic on the port for this service only within the Virtual Private Cloud (VPC). AWS EFS is currently only available to the private IPv4 address space of the VPC.

An EFS directory is used by the CloudInit directives during initialization of my AWS EC2 instances. The nfs-common additional package is required to mount the persistent Amazon Web Services Elastic File System. Once the nfs-common package is installed the nfs4 mount can be implemented. Since an additional package is required the mount is performed within the runcmd section and cannot be run earlier in the bootcmd section.

echo
echo Adding nfs4 mount to AWS NW-O VPC Elastic File System
mkdir /mnt/efs
chown ubuntu:ubuntu /mnt/efs
nfsOpt="nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0"
echo "fs-6f45fac6.efs.us-west-2.amazonaws.com:/ /mnt/efs nfs4 ${nfsOpt}" >> /etc/fstab
mount -a -t nfs4
df -Th -x supermount --exclude-type=tmpfs --exclude-type=devtmpf

An advantage of using NFSv4 is that only one IP port, 2049, is used to run the service which simplifies controlling access.

The fs-6f45fac6.efs.us-west-2.amazonaws.com name was assigned when I created the EFS resource. I created the resource in the us-west-2 region and AWS by default creates DNS entries which provide the correct IPv4 address for each of the subnets and interfaces so that the EFS file system is available in all the availability zones for the region.

Use a persistent 48G General Purpose SSD EBS volume

A second EBS volume was created to hold a copy of my /Zz by Date data in 2020. This copy is synced daily with the main copy on my AK LAN main server as long as ak20 is available via ssh. I started a t3.large EC2 instance with 8GiB memory to handle the initial population from the most recent Zz*tgz backup. The t3.nano I normally run could not handle the initial population task but has no problem with the daily rsync jobs. The volume is currently 87% utilized and I have already grown it from an original 44G size. The 48G of EBS costs an additional $4.80 a month and is available to only one EC2 instance.

A snapshot of this volume is created daily and retained for 15 days.

LAM AWS command line options

Launch a single ec2 instance specifying instance type and size
aws ec2 run-instances --count 1 --instance-type ${INSTANCE_TYPE}
Get a public IP address or not
${PublicIPv4}
Launch using my key
--key-name aws-nwo-lam1
Use a predefined security group
--security-group-ids sg-3bda0647
The initial Operating System / Architecture specific Amazon Machine Image to use
--image-id ${AMI}
Specify an instance Name tag
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=${KEYNAME}}]"
  • The Name Tag Value appears in the AWS EC2 Instances page along with Instance type, ID and state.
Specify the file with the user data
--user-data file://${CLOUD_INIT}

A number of the command line options are specified by variables mostly dependent on the Operating System / Architecture / PublicIPv4 options and the values are detailed in the following sections.

LAM AWS EC2 instance initialization by Operating System / Architecture / PublicIPv4

I initially created CloudInit directives only for Ubuntu Server and only the x86-64 architecture. This was originally on x86-64 Ubuntu Server 16.04 LTS, then x86-64 Ubuntu 18.04 LTS, then x86-64 Ubuntu Server 20.04 LTS and x86-64 Ubuntu Server 22.04 LTS.

The first variant was the CloudInit directives to have ssh on port 443 instead of https allowing me to setup a SSH SOCKS5 Proxy server on port 443 in some environments such as on hotel / resort Wi-Fi. This variant does not support the secure site where Mediawiki and other MariaDB web applications live.

In 2022 After upgrading to x86-64 Ubuntu Server 22.04 LTS I created an x86-64 Amazon Linux 2 initialization.

In 2023 I created an x86-64 Amazon Linux 2023 initialization after it became available in March. I followed in 2023 with ARM Amazon Linux 2023, and ARM Ubuntu Server 22.04 LTS initialization scripts. I then added Debian 12 scripts for both x86-64 and ARM architectures.

In 2023 I added the PublicIPv4 option.

Amazon Machine Image by Operating System / Architecture

Amazon Machine Image (AMI)s are available for a number of Operating System / Architecture configurations. A number of AMIs are supported and maintained by AWS, some provided by the AWS community and custom AMIs can be made. I could create a custom AMI but instead use a AWS provided AMI provided without additional charge and perform the initialization with the CloudInit directives. The initialization takes a few minutes but I avoid having to pay for the storage of the AMI as an EBS snapshot.

Each AMI is for a Region, Operating system, Architecture, and Storage for the root device. I use Oregon (US West 2) Region images with an Elastic Block Store (EBS) root device. I have CloudInit directives for Ubuntu server 22.04, Debian 12, Amazon Linux 2, and Amazon Linux 2023 for both x86 and ARM Architectures.

LAM AWS user-data is a set of CloudInit directives

The LAM AWS server is initialized with CloudInit directives to install the necessary packages, configuration and content on top of a generic Server image. All the directives in a file can be specified with the user-data parameter or in Advanced Options of the launch page from the AWS web console. The directives can also be pasted into the text box when using the web console. The CloudInit package is a great tool for AWS EC2 initialization.

Instance to take over lam1

The main initialization directives update the Ubuntu server to support all the virtual hosts of the LAM AWS cloud and automatically assume the lam1 domain subset of hosts. Additional Dynamic Domain Name Service#Check-in from a Linux host operations can be performed to take over more or all of the lam1 domain subsets.

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam1-Ubuntu-CloudInit.txt
KEYNAME=lam1-Ubuntu-x86
AMI=ami-0efcece6bed30fd98 # Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on 2023-09-19
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam1-Ubuntu-CloudInit-ARM.txt
KEYNAME=lam1-Ubuntu-ARM
AMI=ami-03fd0aa14bd102718 # Canonical, Ubuntu, 22.04 LTS, arm64 jammy image build on 2023-09-19
Instance designed to initiate without public IPv4 access

Fails: Some of the default servers for Ubuntu don't support IPv6. Using "Canonical, Ubuntu, 22.04 LTS, arm64 jammy image build on 2023-09-19" can't do apt upgrade or apt install without IPv4.

PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam1-Ubuntu-No-Public-IPv4-CloudInit.txt
KEYNAME=lam1-Ubuntu-x86-No-Public-IPv4
AMI=ami-0efcece6bed30fd98 # Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on 2023-09-19
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam1-Ubuntu-CloudInit-ARM-No-Public-IPv4.txt
KEYNAME=lam1-Ubuntu-ARM-No-Public-IPv4
AMI=ami-03fd0aa14bd102718 # Canonical, Ubuntu, 22.04 LTS, arm64 jammy image build on 2023-09-19

lam2 Instance to be a SSH SOCKS5 Proxy server on port 443

Port 443 is normally used for HTTPS so is likely to be available even when other ports are blocked. I run this instance only when I find my ssh access blocked when using someone else's WiFi such as from the laptop at a hotel or for testing.

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Ubuntu-CloudInit.txt
KEYNAME=lam2-Ubuntu-x86
AMI=ami-0efcece6bed30fd98 # Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on 2023-09-19
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Ubuntu-ARM-CloudInit.txt
KEYNAME=lam2-Ubuntu-ARM
AMI=ami-03fd0aa14bd102718 # Canonical, Ubuntu, 22.04 LTS, arm64 jammy image build on 2023-09-19
This instance doesn't check in to a Dynamic Domain Name Service
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-lam2-Amazon-Linux-2-CloudInit.txt
KEYNAME=lam2-AL2-x86-port-443
AMI=ami-01acac09adf473073; # x86 Amazon Linux 2 Kernel 5.10 AMI 2.0.20230504.1 x86_64 HVM gp2

Like in What is missing, this instance doesn't check in to a Dynamic Domain Name Service.

From another instance in the same VPC I can use Secure Copy to get the private ec2-user resource archive to the new instance over the local area network with:

scp -p /mnt/efs/aws-lam1-ubuntu/ec2-user.t* ec2-user@<local-ipv4>:/tmp

On the new instance I can install these resources with:

tar -xzf /tmp/ec2-user.tgz --directory ${HOME}

lam2 Instance running Amazon Linux 2 rather than Ubuntu Server

This instance runs on Amazon Linux 2 rather than Ubuntu Server. There are a number of package differences and differences in Apache2 configuration. With the addition of EPEL and amazon-linux-extras repositories it supports being a LAM Alaska clone including the MediaWiki and other functions served by https.

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2-CloudInit.txt
KEYNAME=lam2-Amazon-Linux-2-x86
AMI=ami-002c2b8d1f5b1eb47; # Amazon Linux 2 Kernel 5.10 AMI 2.0.20230822.0 x86_64 HVM gp2
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2-ARM-CloudInit.txt
KEYNAME=lam2-Amazon-Linux-2-ARM
AMI=ami-009679ec62fff5cac; # Amazon Linux 2 LTS Arm64 Kernel 5.10 AMI 2.0.20230822.0 arm64 HVM gp2
Instance designed to initiate without public IPv4 access
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2-No-Public-IPv4-CloudInit.txt
KEYNAME=lam2-Amazon-Linux-2-x86-No-Public-IPv4
AMI=ami-002c2b8d1f5b1eb47; # Amazon Linux 2 Kernel 5.10 AMI 2.0.20230822.0 x86_64 HVM gp2
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2-ARM-No-Public-IPv4-CloudInit.txt
KEYNAME=lam2-Amazon-Linux-2-ARM-No-Public-IPv4
AMI=ami-009679ec62fff5cac; # Amazon Linux 2 LTS Arm64 Kernel 5.10 AMI 2.0.20230822.0 arm64 HVM gp2

lam2 Instance running Amazon Linux 2023

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-CloudInit-no-packages.txt
KEYNAME=lam2-AL2023-x86
AMI=ami-093467ec28ae4fe03 # Amazon Linux 2023 AMI 2023.2.20231113.0 x86_64 HVM kernel-6.1
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-CloudInit-Arm.txt
KEYNAME=lam2-AL2023-ARM
AMI=ami-058a0afa5f1acc977 # Amazon Linux 2023 AMI 2023.2.20231113.0 arm64 HVM kernel-6.1
This cloud-init fails if the instance has less than 1.0 GiB of Memory.

A t3a.micro x86 is big enough but twice as expensive as the t4g.nano ARM or t3a.nano x86 instance type which can run the no packages versions.

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-CloudInit.txt
KEYNAME=lam2-AL2023-x86-packages
AMI=ami-093467ec28ae4fe03 # Amazon Linux 2023 AMI 2023.2.20231113.0 x86_64 HVM kernel-6.1
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-CloudInit-ARM.txt
KEYNAME=lam2-AL2023-ARM
AMI=ami-058a0afa5f1acc977 # Amazon Linux 2023 AMI 2023.2.20231113.0 arm64 HVM kernel-6.1
Instance designed to initiate without public IPv4 access
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-No-Public-IPv4-CloudInit-no-packages.txt
KEYNAME=lam2-AL2023-x86-No-Public-IPv4
AMI=ami-093467ec28ae4fe03 # Amazon Linux 2023 AMI 2023.2.20231113.0 x86_64 HVM kernel-6.1
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-No-Public-IPv4-CloudInit-Arm.txt
KEYNAME=lam2-AL2023-Arm-No-Public-IPv4
AMI=ami-058a0afa5f1acc977 # Amazon Linux 2023 AMI 2023.2.20231113.0 arm64 HVM kernel-6.1
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Amazon-Linux-2023-No-Public-IPv4-CloudInit-ARM.txt
KEYNAME=lam2-AL2023-ARM-No-Public-IPv4
AMI=ami-058a0afa5f1acc977 # Amazon Linux 2023 AMI 2023.2.20231113.0 arm64 HVM kernel-6.1

lam2 Instance running Debian 12

PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Debian-x86-CloudInit.txt
KEYNAME=lam2-Debian-x86
AMI=ami-0b6edd8449255b799; # debian-12-amd64-20230711-1438
PublicIPv4='--associate-public-ip-address' # Public IPv4 address costs $43.80/Year
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Debian-ARM-CloudInit.txt
KEYNAME=lam2-Debian-ARM
AMI=ami-0cf467cdd983a5859; # debian-12-arm64-20230711-1438
This instance is designed to initiate without public IPv4 access.
PublicIPv4='--no-associate-public-ip-address' # No Public IPv4 address
CLOUD_INIT=/var/www/aws/aws-nwo-lam2-Debian-ARM-No-Public-IPv4-CloudInit.txt
KEYNAME=lam2-Debian-ARM-No-Public-IPv4
AMI=ami-0cf467cdd983a5859; # debian-12-arm64-20230711-1438

Amazon Instance Type by Architecture and size

INSTANCE_TYPE=t4g.nano; # ARM 0.5 GiB 2 vCPU $0.0042 / hour = $0.1008 / day ~= $3.024 / month
INSTANCE_TYPE=t3a.nano; # x86 0.5 GiB 2 vCPU $0.0047 / hour = $0.1128 / day ~= $3.384 / month
INSTANCE_TYPE=t3.nano; # x86 0.5 GiB 2 vCPU $0.0052 / hour = $0.1248 / day ~= $3.74 / month
INSTANCE_TYPE=t2.nano; # x86 0.5 GiB 1 vCPU $0.0058 / hour = $0.1392 / day ~= $4.176 / month
INSTANCE_TYPE=t4g.micro; # ARM 1 GiB 2 vCPU $0.0084 / hour = $0.2016 / day ~= $6.048 / month
INSTANCE_TYPE=t3a.micro; # x86 1 GiB 2 vCPU $0.0094 / hour = $0.2256 / day ~= $6.768 / month
INSTANCE_TYPE=t3.micro; # x86 1 GiB 2 vCPU $0.0104 / hour = $0.2496 / day ~= $7.488 / month
INSTANCE_TYPE=t2.micro; # x86 1 GiB 1 vCPU $0.0116 / hour = $0.2784 / day ~= $8.352 / month
INSTANCE_TYPE=t4g.small; # ARM 2 GiB 2 vCPU $0.0168 / hour = $0.4032 / day ~= $12.096 / month
INSTANCE_TYPE=t3a.small; # x86 2 GiB 2 vCPU $0.0188 / hour = $0.4512 / day ~= $13.536 / month
INSTANCE_TYPE=t3.small; # x86 2 GiB 2 vCPU $0.0208 / hour = $0.4992 / day ~= $14.976 / month
INSTANCE_TYPE=t4g.medium; # ARM 4 GiB 2 vCPU $0.0336 / hour = $0.8064 / day ~= $24.192 / month
INSTANCE_TYPE=t3a.medium; # x86 4 GiB 2 vCPU $0.0376 / hour = $0.9024 / day ~= $27.072 / month
INSTANCE_TYPE=t3.medium; # x86 4 GiB 2 vCPU $0.0416 / hour = $0.9984 / day ~= $29.952 / month
INSTANCE_TYPE=t4g.large; # ARM 8 GiB 2 vCPU $0.0672 / hour = $1.6128 / day ~= $48.384 / month
INSTANCE_TYPE=t3a.large; # x86 8 GiB 2 vCPU $0.0752 / hour = $1.8048 / day ~= $54.144 / month
INSTANCE_TYPE=t3.large; # x86 8 GiB 2 vCPU $0.0832 / hour = $1.9968 / day ~= $59.904 / month

Each specific Initial AMI will only launch with a matching instance type Architecture.

Launch a LAM AWS EC2 instance from the command line

The awscli package includes the aws command which includes the ability to launch a new instance.

aws ec2 run-instances --count 1 --image-id ${AMI} \
--instance-type ${INSTANCE_TYPE} --security-group-ids sg-3bda0647 --tag-specifications \
"ResourceType=instance,Tags=[{Key=Name,Value=${KEYNAME}}]" \
${PublicIPv4} --key-name aws-nwo-lam1 --user-data \
file://${CLOUD_INIT}

Amazon Web Services (AWS)

The LAM AWS EC2 instance initializations perform the following:

This results in an instance using one of the http://lam1.duckdns.org or http://lam2.duckdns.org subdomains that is a LAM Alaska clone based on the latest daily backups.

LAM AWS Updates and Backups

Latest daily backup to persistent storage is used for initialization

The LAM AWS server instance hosting my public named host websites and a backup of the secure side of my main server is designed to use a set of CloudInit directives and a small amount of data on top of the latest Amazon Machine Image (AMI) on the default launch image page. The initialization takes a few minutes but this means I don't have to pay for the storage of a custom AMI.

Daily backups to the persistent parallel file system are used for a new instance initialization so that it is current except for changes made to the main server within the last 24 hours.

New instance initialization includes a full upgrade of the latest Amazon Machine Image

New instance initialization includes a full upgrade so testing after the launch of a new image should show if any updates that have not been applied to the current main running instance cause problems.

The latest Amazon Machine Image is specified as a command line option for the "aws ec2 run-instances" command. A new image on the default launch image page is tested when it appears and usually can be substituted without any other changes to the new instance initialization. Some package changes required changes to the new instance initialization when I did the major upgrade to Ubuntu 18.04 from Ubuntu 16.04 but most simply shorten the full upgrade performed during the new instance initialization.

CloudInit directives and a set of scripts control use and creation of daily backups

The CloudInit directives specified as user-data when launching a new instance are maintained in the files linked to above.

A set of scripts on the persistent parallel file system are included in daily backups on the main server to keep the backups up to date. Any configuration file changes from package defaults must be included in the backups and or applied during the new instance initialization.

Repos for LAM AWS Linux Apache MariaDB in the cloud

I have published some of the repos of the server configuration and the content in the html folder and an apache2 configuration for the websites to GitHub.

Log


16 visits (2 today, 16 this week, 16 this month, 16 this year)
Uptime: 10:37:21 up 1 day, 16:26, 0 users, load average: 0.00, 0.00, 0.00
3.235.145.108 GET from server lam1.us

Saturday, February 24, 2024 @ 10:37:21 AM
lam1.ServerAdmin@lam1.us