From b685ab3974694c9fea99a27cdf16061a18540164 Mon Sep 17 00:00:00 2001 From: Pedro Moura Date: Sep 04 2025 18:55:14 +0000 Subject: [PATCH 1/2] Add how to create aws instance Signed-off-by: Pedro Moura --- diff --git a/modules/sysadmin_guide/pages/create-aws-instance.adoc b/modules/sysadmin_guide/pages/create-aws-instance.adoc new file mode 100644 index 0000000..1a04013 --- /dev/null +++ b/modules/sysadmin_guide/pages/create-aws-instance.adoc @@ -0,0 +1,86 @@ += How to Create an Instance on AWS + +This guide outlines the process of creating an instance on AWS, covering everything from prerequisites to connecting to the created virtual machine. It includes instructions for accessing the EC2 console, selecting an AMI, configuring the instance type, network, storage, and advanced options like initialization scripts. After reviewing the configurations, the user launches the instance, configures an SSH key for access, and verifies its status. Finally, the guide explains how to connect to the instance via SSH, ensuring proper configuration and use of the cloud infrastructure. + +== Prerequisites + +Before starting, ensure you have: + +- Access to the AWS Management Console. +- Permissions to create instances on Amazon EC2. + +== Step-by-Step Guide + +=== 1. Access the EC2 Console + +1. Log in to the `AWS Management Console` via Ipsilon https://id.fedoraproject.org/saml2/SSO/Redirect?SPIdentifier=urn:amazon:webservices&RelayState=https://console.aws.amazon.com[through this link]. You can check how to access the **AWS Console** https://docs.fedoraproject.org/en-US/infra/sysadmin_guide/aws-access/#_accessing_the_aws_console[here]. +2. In the services menu, locate and click on **EC2** (Elastic Compute Cloud). + +=== 2. Start the Creation Process + +1. On the EC2 homepage, click **Instances** and then **Launch Instances**. +2. On the next screen, enter a name for your instance in the **Name and tags** field. +3. Select an Amazon Machine Image (AMI) containing the desired operating system. + +=== 3. Select the Instance Type + +1. Choose the instance type based on your resource requirements (CPU, memory, etc.). + +=== 4. Choose or Create an SSH Key + +1. Select an existing SSH key or create a new one to access the instance. + - If creating a new one, download and securely store the `.pem` file. + - You will need this key to access the instance via SSH. + +=== 5. Configure Network Settings + +1. Ensure the instance is in a **VPC** (Virtual Private Cloud). +2. Select an existing subnet (preferably in a specific availability zone). +3. Configure the **Security Group** or select an existing one: + - Allow the necessary ports (e.g., `22` for SSH or `80` for HTTP). + +=== 6. Configure Storage + +1. Set the storage volume for the instance. + +=== 7. Advanced Configurations (Optional) + +1. Configure initialization scripts (User Data) if necessary. + - Example script to install a web server on Linux: + ```bash + #!/bin/bash + sudo yum update -y + sudo yum install -y httpd + sudo systemctl start httpd + sudo systemctl enable httpd + ``` +2. Select IAM roles or profiles, if necessary, to grant specific permissions to the instance. + +=== 8. Review and Launch + +1. Review all the configurations of your instance. +2. Click **Launch**. + +=== 9. Confirm the Launch + +1. Click **Launch Instances**. +2. You will be redirected to a confirmation page. + +=== 10. Verify the Status + +1. Return to the EC2 dashboard and click on **Instances** in the side menu. +2. Wait until the instance status changes to **Running**. + +== Connecting to the Instance + +=== Via SSH + +1. Open the terminal. +2. Use the following command to connect to the instance: + ```bash + ssh -i /path/to/your-key.pem ec2-user@Instance-IP + ``` + +== Conclusion + +Congratulations! You have successfully created and accessed your instance on AWS. Use it as needed for your projects or experiments. From 2b5877aa36997cbbc0403033d307da97f0419c77 Mon Sep 17 00:00:00 2001 From: Pedro Moura Date: Sep 04 2025 18:55:14 +0000 Subject: [PATCH 2/2] Added section about tags Signed-off-by: Pedro Moura --- diff --git a/modules/sysadmin_guide/pages/create-aws-instance.adoc b/modules/sysadmin_guide/pages/create-aws-instance.adoc index 1a04013..92c8cfd 100644 --- a/modules/sysadmin_guide/pages/create-aws-instance.adoc +++ b/modules/sysadmin_guide/pages/create-aws-instance.adoc @@ -32,6 +32,8 @@ Before starting, ensure you have: - If creating a new one, download and securely store the `.pem` file. - You will need this key to access the instance via SSH. +Note here that if the instance will be managed by ansible there's an ansible key + === 5. Configure Network Settings 1. Ensure the instance is in a **VPC** (Virtual Private Cloud). @@ -49,8 +51,8 @@ Before starting, ensure you have: - Example script to install a web server on Linux: ```bash #!/bin/bash - sudo yum update -y - sudo yum install -y httpd + sudo dnf update -y + sudo dnf install -y httpd sudo systemctl start httpd sudo systemctl enable httpd ``` @@ -81,6 +83,10 @@ Before starting, ensure you have: ssh -i /path/to/your-key.pem ec2-user@Instance-IP ``` +== Tags + +Every new instance must be configured with tags. It is necessary to define at least the "FedoraGroup" tag to associate it with a group in the instance and the storage volume. + == Conclusion Congratulations! You have successfully created and accessed your instance on AWS. Use it as needed for your projects or experiments.