From 09844cef47105b8aca74145a5ed61f117d69ad11 Mon Sep 17 00:00:00 2001 From: Nico3819 Date: Jan 24 2026 08:07:11 +0000 Subject: [PATCH 1/3] Update navigation and add AWS page --- diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index e9e500d..b6c8ad4 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -1,3 +1,4 @@ * xref:wsl.adoc[Windows Subsystem for Linux] * xref:azure.adoc[Fedora on Microsoft Azure] -* xref:faq.adoc[FAQ] \ No newline at end of file +* xref:aws.adoc[Fedora on AWS] +* xref:faq.adoc[FAQ] diff --git a/modules/ROOT/pages/aws.adoc b/modules/ROOT/pages/aws.adoc new file mode 100644 index 0000000..a4bb726 --- /dev/null +++ b/modules/ROOT/pages/aws.adoc @@ -0,0 +1,313 @@ += Fedora on AWS + + +We will install Fedora 43 onto a AWS EC2 instance in the us-west-2 region. + +Start at https://fedoraproject.org/cloud/download#cloud_launch + +Note the AWS region and the AMI ID: + +**Region**: US West (Oregon) (us-west-2) + +**AMI ID**: ami-09d4a84b1cda0ac74 + +== Prerequisites + +**Step 1: Download the Installer** + +Download the AWS CLI from the AWS CLI Website site: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html +Choose the type of CLI software based on your OS specifications + +**Step 2: Run the Installer** + +Use the following command to run the installer for the downloaded script in the Linux System: + +[source,bash] +---- +$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +$ unzip awscliv2.zip +$ sudo ./aws/install +---- + +**Step 3: Verify the Installation** + +Verify the installation of AWS with the following command: + +[source,bash] +---- +$ aws - version +---- + +**Step 4: Configure the AWS CLI** + +Now, configure with your aws credentials such as Access Key and Secret Key by running the following command: + +[source,bash] +---- +$ aws configure +---- + + +== Step-by-Step Guide to Creating an EC2 Instance using AWS CLI + +If you have an existing VPC, with Subnets, Internet Gateway, Route Table, Security Group, and key pairs, skip to the Running the EC2 instance step. If not, follow the next steps listed to create a default VPC. Creating the default VPC, creates the Subnets, Internet Gateway, Route Table, etc. for you. + + +=== Creating a default VPC + +Create a VPC (Virtual Private Cloud) as shown below. + +[source,bash] +---- +$ aws ec2 create-default-vpc +{ + "Vpc": { + "OwnerId": "985539757503", + "InstanceTenancy": "default", + "Ipv6CidrBlockAssociationSet": [], + "CidrBlockAssociationSet": [ + { + "AssociationId": "vpc-cidr-assoc-0111c20e708b227a2", + "CidrBlock": "172.31.0.0/16", + "CidrBlockState": { + "State": "associated" + } + } + ], + "IsDefault": true, + "Tags": [], + "VpcId": "vpc-00617799cf31e2740", + "State": "pending", + "CidrBlock": "172.31.0.0/16", + "DhcpOptionsId": "dopt-02320dcaf6fd91eb3" + } +} +---- + +Here the CIDR block is 172.31.0.0/16. The output will be given in a JSON format. Note the vpcId. + +=== Subnets + +Check if the subnets are created successfully: + +[source,bash] +---- +aws ec2 describe-subnets - filters "Name=vpc-id,Values=" - query "Subnets[*].{ID:SubnetId,CIDR:CidrBlock}" +---- + +Example: + +[source,bash] +---- +$ aws ec2 describe-subnets --filters "Name=vpc-id,Values=vpc-00617799cf31e2740" --query "Subnets[*].{ID:SubnetId,CIDR:CidrBlock}" +[ + { + "ID": "subnet-0cfbac16072874109", + "CIDR": "172.31.0.0/20" + }, + { + "ID": "subnet-0bf950784376cab19", + "CIDR": "172.31.16.0/20" + }, + { + "ID": "subnet-0d10af3548785ccc7", + "CIDR": "172.31.48.0/20" + }, + { + "ID": "subnet-08c1988b07451008b", + "CIDR": "172.31.32.0/20" + } +] +---- + + +=== Internet Gateway + +Internet gateway are created as part of creating the default VPC. Check if the subnets are created successfully. + +[source,bash] +---- +aws ec2 describe-internet-gateways +---- + +Example: + +[source,bash] +---- +$ aws ec2 describe-internet-gateways +{ + "InternetGateways": [ + { + "Attachments": [ + { + "State": "available", + "VpcId": "vpc-00617799cf31e2740" + } + ], + "InternetGatewayId": "igw-0edf1325238ca299f", + "OwnerId": "985539757503", + "Tags": [] + } + ] +} +---- + + +=== Route Table + +A Route Table is also created and assigned to the default VPC. + +[source,bash] +---- +$ aws ec2 describe-route-tables +{ + "RouteTables": [ + { + "Associations": [ + { + "Main": true, + "RouteTableAssociationId": "rtbassoc-0ed54d31a73dc80c2", + "RouteTableId": "rtb-0571c0444bafe3dbc", + "AssociationState": { + "State": "associated" + } + } + ], + "PropagatingVgws": [], + "RouteTableId": "rtb-0571c0444bafe3dbc", + "Routes": [ + { + "DestinationCidrBlock": "172.31.0.0/16", + "GatewayId": "local", + "Origin": "CreateRouteTable", + "State": "active" + }, + { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": "igw-0edf1325238ca299f", + "Origin": "CreateRoute", + "State": "active" + } + ], + "Tags": [], + "VpcId": "vpc-00617799cf31e2740", + "OwnerId": "985539757503" + } + ] +} +---- + + +=== Create a Key Pair and Security Group + +An AWS key pair is a set of secure credentials consisting of a public key and a private key, used primarily to securely connect to Amazon EC2 instances + +Now, create the key-pair using the below command: + +[source,bash] +---- +$ aws ec2 create-key-pair --key-name my-keypair --query "KeyMaterial" --output text > my-keypair.pem +---- + +Here we have named the key pair file as my-keypair.pem and it is downloaded into the current directory where the command was run from. + +For creating the Security Group use the below commands: + +[source,bash] +---- +aws ec2 create-security-group --group-name --description "" --vpc-id +---- + +Example: + +[source,bash] +---- +$ aws ec2 create-security-group --group-name FedoraSG --description "Fedora Security Group" --vpc-id vpc-00617799cf31e2740 +{ + "GroupId": "sg-07a6089d022898d5e", + "SecurityGroupArn": "arn:aws:ec2:us-west-2:985539757503:security-group/sg-07a6089d022898d5e" +} +---- + +Note the GroupId and use it in the next step. + +[source,bash] +---- +aws ec2 authorize-security-group-ingress - group-id - protocol tcp - port 22 - cidr 0.0.0.0/0 +---- + +Example: + +[source,bash] +---- +$ aws ec2 authorize-security-group-ingress --group-id sg-07a6089d022898d5e --protocol tcp --port 22 --cidr 0.0.0.0/0 +{ + "Return": true, + "SecurityGroupRules": [ + { + "SecurityGroupRuleId": "sgr-0ad9c03c1d572224c", + "GroupId": "sg-07a6089d022898d5e", + "GroupOwnerId": "985539757503", + "IsEgress": false, + "IpProtocol": "tcp", + "FromPort": 22, + "ToPort": 22, + "CidrIpv4": "0.0.0.0/0", + "SecurityGroupRuleArn": "arn:aws:ec2:us-west-2:985539757503:security-group-rule/sgr-0ad9c03c1d572224c" + } + ] +} +---- + +The protocol/port we use here is TCP/22, which is the standard port for the Secure Shell (SSH) protocol. + +Running the EC2 Instance +Next, run the EC2 Instance using the command as given below. + +[source,bash] +---- +aws ec2 run-instances - image-id - instance-type t2.micro + - key-name - security-group-ids + - subnet-id + - associate-public-ip-address + - tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=MyEC2Instance}]' +---- + +Example: + +[source,bash] +---- +$ aws ec2 run-instances - image-id ami-09d4a84b1cda0ac74 - instance-type t2.micro - key-name my-keypair - subnet-id subnet-08c1988b07451008b - security-group-ids sg-07a6089d022898d5e - associate-public-ip-address - tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=MyEC2Instance}]' +At this step, you will need an AMI (Amazon Machine Image) image ID. Use the Fedora AMI Id for the us-west-2 region we noted above ie. ami-09d4a84b1cda0ac74 +---- + +=== Connecting to the Fedora EC2 Instance + +- Open an SSH client. + +- Locate your private key file. The key used to launch this instance is my-keypair.pem + +- Run this command, if necessary, to ensure your key is not publicly viewable. + +[source,bash] +---- +$ chmod 400 "my-keypair.pem" +---- + +- Connect to your instance using its Public DNS: + +Example: + +[source,bash] +---- +$ ssh -i "my-keypair.pem" fedora@ec2–54–218–117–248.us-west-2.compute.amazonaws.com +The authenticity of host 'ec2–54–218–117–248.us-west-2.compute.amazonaws.com (54.218.117.248)' can't be established. +ED25519 key fingerprint is SHA256:/Gw7ysOzRvVsvbz3xdOyFP1F7mm3sFIYE1hPhJCCZ8M. +This key is not known by any other names. +Are you sure you want to continue connecting (yes/no/[fingerprint])? yes +Warning: Permanently added 'ec2–54–218–117–248.us-west-2.compute.amazonaws.com' (ED25519) to the list of known hosts. + +[fedora@ip-172–31–39–204 ~]$ +[fedora@ip-172–31–39–204 ~]$ cat /etc/redhat-release +Fedora release 43 (Forty Three) +---- From 33ce26d9679705ca6f2cd9575fdb9504c23c54d7 Mon Sep 17 00:00:00 2001 From: Nico3819 Date: Jan 24 2026 18:16:45 +0000 Subject: [PATCH 2/3] Update navigation and add AWS page --- diff --git a/modules/ROOT/pages/aws.adoc b/modules/ROOT/pages/aws.adoc index a4bb726..c346bef 100644 --- a/modules/ROOT/pages/aws.adoc +++ b/modules/ROOT/pages/aws.adoc @@ -20,7 +20,7 @@ Choose the type of CLI software based on your OS specifications **Step 2: Run the Installer** -Use the following command to run the installer for the downloaded script in the Linux System: +To install the AWS CLI, run the following commands. [source,bash] ---- From e198b2231314027d553dbad6b8a73eca032a08ec Mon Sep 17 00:00:00 2001 From: Nico3819 Date: Jan 31 2026 20:03:45 +0000 Subject: [PATCH 3/3] Update navigation and add AWS page --- diff --git a/modules/ROOT/pages/aws.adoc b/modules/ROOT/pages/aws.adoc index c346bef..688fa0c 100644 --- a/modules/ROOT/pages/aws.adoc +++ b/modules/ROOT/pages/aws.adoc @@ -3,13 +3,11 @@ We will install Fedora 43 onto a AWS EC2 instance in the us-west-2 region. -Start at https://fedoraproject.org/cloud/download#cloud_launch +To launch an instance in AWS, you will need the Amazon Machine Image (AMI) ID for the Fedora image for the region and machine architecture you want to use. -Note the AWS region and the AMI ID: +The list of regions for both x86_64 and aarch64 are available under the “Launch on public cloud platforms” section of https://fedoraproject.org/cloud/download#cloud_launch -**Region**: US West (Oregon) (us-west-2) - -**AMI ID**: ami-09d4a84b1cda0ac74 +For example, to launch an x86_64 Fedora 43 AMI in the us-west-2 region, the AMI ID is ami-09d4a84b1cda0ac74. Note that the AMI ID changes with each release. == Prerequisites @@ -20,7 +18,14 @@ Choose the type of CLI software based on your OS specifications **Step 2: Run the Installer** -To install the AWS CLI, run the following commands. +Install the AWS CLI on Fedora using the DNF package manager as follows. + +[source,bash] +---- +$ sudo dnf install awscli -y +---- + +To install the AWS CLI on other Linux, run the following commands. [source,bash] ----