diff --git a/Cloud/0-linux/README.md b/Cloud/0-linux/README.md index ee96cb12..bcd9f1ef 100644 --- a/Cloud/0-linux/README.md +++ b/Cloud/0-linux/README.md @@ -7,7 +7,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------------------- diff --git a/Cloud/0-linux/lab0/README.md b/Cloud/0-linux/lab0/README.md index 9c5cdfdb..6eacc92a 100644 --- a/Cloud/0-linux/lab0/README.md +++ b/Cloud/0-linux/lab0/README.md @@ -1,148 +1,148 @@ -# Working with Users and Permissions - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## _Become root_: -`sudo -i`
-Enter the cloud_user password at the prompt. - -## _Add the Users to the Server_: -``` -useradd tstark -useradd cdanvers -useradd dprince -``` - -## _Create the new group_: -`groupadd superhero`
-Set wheel Group as the the tstark Account's Primary Group. The usermod command will change which group a user is in. Change tstark: -`usermod -g wheel tstark`
-Make sure it worked:
-`id tstark`
-The command's output should show his primary group is now wheel. - -## _Supplementary Group on All Three Users_: -Run the usermod command for each user: -``` -usermod -aG superhero tstark -usermod -aG superhero dprince -usermod -aG superhero cdanvers -``` - -Check with any of the users to make sure it worked:
-`id ` - -## _Lock a specific Account_: -`usermod -L dprince` - -## _Create New Users_: -Create a gfreeman user on the system:
-`sudo useradd -m gfreeman` - -Create an avance user, and assign it to the wheel supplemental group:
-`sudo useradd -G wheel -m avance` - -Set the password for both accounts to LASudo321: -``` -sudo passwd gfreeman -sudo passwd avance -``` - -## _Verify the /etc/sudoers File and Test Access_: - -1. Verify that the /etc/sudoers file will allow the wheel group access to run all commands with sudo:
-`sudo visudo`
-2. Note that there should not be a comment (#) on this line of the file:
-`%wheel ALL=(ALL) ALL`
-3. Switch to the avance account, and use the dash (-) to utilize a login shell:
-`sudo su - avance`
-4. Attempt to read the /etc/shadow file at the console:
-`cat /etc/shadow`
-5. Rerun the command with the sudo command:
-`sudo cat /etc/shadow`
-6. After you have verified avance can read the /etc/shadow file, log out of that account:
-`exit` - -## _Set Up the Web Administrator_: -1. Create a new sudoers file in the /etc/sudoers.d directory that will contain a standalone entry for webmasters:
-`sudo visudo -f /etc/sudoers.d/web_admin` -2. Enter in the following at the top of the file:
-`Cmnd_Alias WEB = /bin/systemctl restart httpd.service, /bin/systemctl reload httpd.service` -3. Add another line in the file for gfreeman to be able to use the sudo command in conjunction with any commands listed in the WEB alias: -`gfreeman ALL=WEB` -4. Save and close the file with `:wq!`. -5. Next, log in to the gfreeman account:
-`sudo su - gfreeman` -6. Attempt to restart the web service:
-`sudo systemctl restart httpd.service` -7. Try to read the new web_admin sudoers file:
-`sudo cat /etc/sudoers.d/web_admin`
-Since the cat command is not listed in the command alias group for WEB, gfreeman cannot use sudo to read this file. - -## _Enable SSH to Connect Without a Password from the dev User on server1 to the dev User on server2_: -1. Generate an SSH key:
-`[dev@server1]$ ssh-keygen` -2. Press Enter three times to accept the defaults. -3. Then copy it over to the private IP of the other server:
-`[dev@server1]$ ssh-copy-id ` -4. Now if we try to log into server2 without a password, it should work. Try it:
-`[dev@server1]$ ssh ` -5. Log out to get back to server1:
-`[dev@server2]$ logout` - -## _Copy All tar Files from /home/dev/ on server1 to /home/dev/ on server2_: -1. Copy the files:
-`[dev@server1]$ scp *.gz :~/` -2. Connect to server2 again:
-`[dev@server1]$ ssh ` -3. Make sure they're there:
-`[dev@server2]$ ll`
-It should show the two files. - -## _Extract the Files, Making Sure the Output is Redirected_: -1. Extract the files:
-``` -[dev@server2]$ tar -xvf deploy_content.tar.gz >> tar-output.log -[dev@server2]$ tar -xvf deploy_script.tar.gz >> tar-output.log -``` -2.Take a look at what's in the directory now:
-`ll`
-We'll see the new files and their permissions. - -## _Set the Umask So New Files Are Only Readable and Writeable by the Owner_: -1. We need to make new files with 0600 (`-rw-------`) permissions. Since the default is 0666, and we want it to be 0600, run the following:
-`[dev@server2]$ umask 0066` - -## _Verify the /home/dev/deploy.sh Script Is Executable and Run It_: -1. Check permissions on deploy.sh:
-`[dev@server2]$ ls -l deploy.sh` -2. Make the script executable:
-`[dev@server2]$ chmod +x deploy.sh` -3. Run it:
-`[dev@server2]$ ./deploy.sh` - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Working with Users and Permissions + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## _Become root_: +`sudo -i`
+Enter the cloud_user password at the prompt. + +## _Add the Users to the Server_: +``` +useradd tstark +useradd cdanvers +useradd dprince +``` + +## _Create the new group_: +`groupadd superhero`
+Set wheel Group as the the tstark Account's Primary Group. The usermod command will change which group a user is in. Change tstark: +`usermod -g wheel tstark`
+Make sure it worked:
+`id tstark`
+The command's output should show his primary group is now wheel. + +## _Supplementary Group on All Three Users_: +Run the usermod command for each user: +``` +usermod -aG superhero tstark +usermod -aG superhero dprince +usermod -aG superhero cdanvers +``` + +Check with any of the users to make sure it worked:
+`id ` + +## _Lock a specific Account_: +`usermod -L dprince` + +## _Create New Users_: +Create a gfreeman user on the system:
+`sudo useradd -m gfreeman` + +Create an avance user, and assign it to the wheel supplemental group:
+`sudo useradd -G wheel -m avance` + +Set the password for both accounts to LASudo321: +``` +sudo passwd gfreeman +sudo passwd avance +``` + +## _Verify the /etc/sudoers File and Test Access_: + +1. Verify that the /etc/sudoers file will allow the wheel group access to run all commands with sudo:
+`sudo visudo`
+2. Note that there should not be a comment (#) on this line of the file:
+`%wheel ALL=(ALL) ALL`
+3. Switch to the avance account, and use the dash (-) to utilize a login shell:
+`sudo su - avance`
+4. Attempt to read the /etc/shadow file at the console:
+`cat /etc/shadow`
+5. Rerun the command with the sudo command:
+`sudo cat /etc/shadow`
+6. After you have verified avance can read the /etc/shadow file, log out of that account:
+`exit` + +## _Set Up the Web Administrator_: +1. Create a new sudoers file in the /etc/sudoers.d directory that will contain a standalone entry for webmasters:
+`sudo visudo -f /etc/sudoers.d/web_admin` +2. Enter in the following at the top of the file:
+`Cmnd_Alias WEB = /bin/systemctl restart httpd.service, /bin/systemctl reload httpd.service` +3. Add another line in the file for gfreeman to be able to use the sudo command in conjunction with any commands listed in the WEB alias: +`gfreeman ALL=WEB` +4. Save and close the file with `:wq!`. +5. Next, log in to the gfreeman account:
+`sudo su - gfreeman` +6. Attempt to restart the web service:
+`sudo systemctl restart httpd.service` +7. Try to read the new web_admin sudoers file:
+`sudo cat /etc/sudoers.d/web_admin`
+Since the cat command is not listed in the command alias group for WEB, gfreeman cannot use sudo to read this file. + +## _Enable SSH to Connect Without a Password from the dev User on server1 to the dev User on server2_: +1. Generate an SSH key:
+`[dev@server1]$ ssh-keygen` +2. Press Enter three times to accept the defaults. +3. Then copy it over to the private IP of the other server:
+`[dev@server1]$ ssh-copy-id ` +4. Now if we try to log into server2 without a password, it should work. Try it:
+`[dev@server1]$ ssh ` +5. Log out to get back to server1:
+`[dev@server2]$ logout` + +## _Copy All tar Files from /home/dev/ on server1 to /home/dev/ on server2_: +1. Copy the files:
+`[dev@server1]$ scp *.gz :~/` +2. Connect to server2 again:
+`[dev@server1]$ ssh ` +3. Make sure they're there:
+`[dev@server2]$ ll`
+It should show the two files. + +## _Extract the Files, Making Sure the Output is Redirected_: +1. Extract the files:
+``` +[dev@server2]$ tar -xvf deploy_content.tar.gz >> tar-output.log +[dev@server2]$ tar -xvf deploy_script.tar.gz >> tar-output.log +``` +2.Take a look at what's in the directory now:
+`ll`
+We'll see the new files and their permissions. + +## _Set the Umask So New Files Are Only Readable and Writeable by the Owner_: +1. We need to make new files with 0600 (`-rw-------`) permissions. Since the default is 0666, and we want it to be 0600, run the following:
+`[dev@server2]$ umask 0066` + +## _Verify the /home/dev/deploy.sh Script Is Executable and Run It_: +1. Check permissions on deploy.sh:
+`[dev@server2]$ ls -l deploy.sh` +2. Make the script executable:
+`[dev@server2]$ chmod +x deploy.sh` +3. Run it:
+`[dev@server2]$ ./deploy.sh` + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab1/README.md b/Cloud/0-linux/lab1/README.md index 251c97f4..aa3a035d 100644 --- a/Cloud/0-linux/lab1/README.md +++ b/Cloud/0-linux/lab1/README.md @@ -1,139 +1,139 @@ -# System Service Management, Runlevels and Boot Targets - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## Configuring a Default Boot Target: -The LPIC-1 exam expects the candidate to know how to change a default target for a Linux computer using systemd. This exercise will assist you in your practice of determining what the default target is, and changing it to a new one. - -## _Check the Default Target_: -The current default target is set to multi-user.target. Use the appropriate command to verify this:
-`systemctl get-default` - -## _Change the Default Target_: -The administrator will need to change the default target so that the computer boots into a graphical desktop:
-`sudo systemctl set-default graphical.target` - -## _Check the Default Target again_: -Now verify that the system is set for a graphical boot:
-`systemctl get-default` - -## Scheduling a Systemd Service Job With Timer Units: -During the time that our development team has spent working on the new Web-based API for our organization, there have been several instances of mistaken keystrokes or processes that have necessitated the restoration of the site directory from backup.
-We have been asked to run periodic backups of the website directory and, given that the development environment does not have access to the backup network, we have decided to write a custom service that will do so.
-Previously we wrote systemd unit files to back up the site and have been provided a file called web-backup.sh in our /root directory. Using that file and the associated web-backup.service, we will create a systemd timer unit file that will control the schedule of our service.
-After we have all three components ready, we'll stage the files in their appropriate locations and start the service for our team and turn it back over for their use.
- -## _Sign in root_: -`[user@$host ~]$ sudo su -` -When prompted, enter the provided lab credentials to finish logging in. - -Considerations: -Part of this job is already done. In a previous lab (lab0), we wrote the systemd unit file, web-backup.service in the /root directory, which we will use alongside the web-backup.sh file that the Dev team gave us. To use it, we need to make sure we are in /root and that the file is there. - -## _Checking path_: -`[root@$host ~]# pwd`
- -## _Checking content_: -`[root@$host ~]# ls` -Output:
-``` -web-backup.sh web-backup.service -``` - -## _Create a Timer Unit File_: -1. With our items sourced, we are ready to create the timer unit file. To do so, use the vi command along with web-backup.timer: -`[root@$host ~]# vi web-backup.timer`
-2. Fill out the information as follows: -``` -[Unit] -Description=Fire off the backup - -[Timer] -OnCalendar=*-*-* 23:00:00 -Persistent=true -Unit=web-backup.service - -[Install] -WantedBy=multi-user.target -``` - -Note that 23:00:00 can be set to anything. We're just picking 11:00 PM here as an example.
-When the file is correct, remember to write and quit properly from vi using the Esc key, : (the colon), then w, then q. - -## _Putting Files Where They Belong_: -1. With everything ready, we now need to make sure our files are in the correct locations. The shell script needs to be copied into /usr/local/sbin with the cp command:
-`[root@$host ~]# cp web-backup.sh /usr/local/sbin/` -2. Then, using the cp command again, copy both the service and timer files into /etc/systemd/:
-`[root@$host ~]# cp web-backup.{service,timer} /etc/systemd/system/` - -## _Tell systemd to Run The Files_: -1. With our files in place, we need to reload the systemd daemon so that it can calculate the service dependencies:
-`[root@$host ~]# systemctl daemon-reload` -2. Now enable the services to run at boot:
-``` -[root@$host ~]# systemctl enable web-backup.service - -[root@$host ~]# systemctl enable web-backup.timer -``` -3. Set the permissions for the file to be executable.
-`[root@$host ~]# chmod +x /usr/local/sbin/web-backup.sh` -4. Once the symlinks are created, go ahead and start the services manually:
-`[root@$host ~]# systemctl start web-backup.timer web-backup.service` -5. Then check on the statuses of both the timer and the service:
-``` -[root@$host ~]# systemctl status web-backup.timer - -[root@$host ~]# systemctl status web-backup.service -``` -They both show as running, meaning this server is ready to go back to the Dev team. - -## Working with System Service Log Files Using the Journal Control: -This is to understand how to use the built-in journalctl utility to view and troubleshoot system services. - -## _Check the Web Server Configuration File_: -1. Change to the root account:
-`sudo su -` -2. Check the status of the web service:
-`systemctl status httpd.service` -3.Attempt to start the web service:
-`systemctl start httpd.service` -4. After the service fails to start, check the journal:
-`journalctl -u httpd.service` -5. Check the directory where the httpd configuration file should be:
-`ls /etc/httpd/conf` -6. Restore the original httpd configuration file:
-`mv /etc/httpd/conf/httpd.conf.bkup /etc/httpd/conf/httpd.conf` -7. Restart the service:
-`systemctl restart httpd.service` - -## _Verify That the Web Server Service Is Running_: -1. Check the status of the service:
-`systemctl status httpd.service` -2. Navigate to the local web page:
-`elinks http://localhost` - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# System Service Management, Runlevels and Boot Targets + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## Configuring a Default Boot Target: +The LPIC-1 exam expects the candidate to know how to change a default target for a Linux computer using systemd. This exercise will assist you in your practice of determining what the default target is, and changing it to a new one. + +## _Check the Default Target_: +The current default target is set to multi-user.target. Use the appropriate command to verify this:
+`systemctl get-default` + +## _Change the Default Target_: +The administrator will need to change the default target so that the computer boots into a graphical desktop:
+`sudo systemctl set-default graphical.target` + +## _Check the Default Target again_: +Now verify that the system is set for a graphical boot:
+`systemctl get-default` + +## Scheduling a Systemd Service Job With Timer Units: +During the time that our development team has spent working on the new Web-based API for our organization, there have been several instances of mistaken keystrokes or processes that have necessitated the restoration of the site directory from backup.
+We have been asked to run periodic backups of the website directory and, given that the development environment does not have access to the backup network, we have decided to write a custom service that will do so.
+Previously we wrote systemd unit files to back up the site and have been provided a file called web-backup.sh in our /root directory. Using that file and the associated web-backup.service, we will create a systemd timer unit file that will control the schedule of our service.
+After we have all three components ready, we'll stage the files in their appropriate locations and start the service for our team and turn it back over for their use.
+ +## _Sign in root_: +`[user@$host ~]$ sudo su -` +When prompted, enter the provided lab credentials to finish logging in. + +Considerations: +Part of this job is already done. In a previous lab (lab0), we wrote the systemd unit file, web-backup.service in the /root directory, which we will use alongside the web-backup.sh file that the Dev team gave us. To use it, we need to make sure we are in /root and that the file is there. + +## _Checking path_: +`[root@$host ~]# pwd`
+ +## _Checking content_: +`[root@$host ~]# ls` +Output:
+``` +web-backup.sh web-backup.service +``` + +## _Create a Timer Unit File_: +1. With our items sourced, we are ready to create the timer unit file. To do so, use the vi command along with web-backup.timer: +`[root@$host ~]# vi web-backup.timer`
+2. Fill out the information as follows: +``` +[Unit] +Description=Fire off the backup + +[Timer] +OnCalendar=*-*-* 23:00:00 +Persistent=true +Unit=web-backup.service + +[Install] +WantedBy=multi-user.target +``` + +Note that 23:00:00 can be set to anything. We're just picking 11:00 PM here as an example.
+When the file is correct, remember to write and quit properly from vi using the Esc key, : (the colon), then w, then q. + +## _Putting Files Where They Belong_: +1. With everything ready, we now need to make sure our files are in the correct locations. The shell script needs to be copied into /usr/local/sbin with the cp command:
+`[root@$host ~]# cp web-backup.sh /usr/local/sbin/` +2. Then, using the cp command again, copy both the service and timer files into /etc/systemd/:
+`[root@$host ~]# cp web-backup.{service,timer} /etc/systemd/system/` + +## _Tell systemd to Run The Files_: +1. With our files in place, we need to reload the systemd daemon so that it can calculate the service dependencies:
+`[root@$host ~]# systemctl daemon-reload` +2. Now enable the services to run at boot:
+``` +[root@$host ~]# systemctl enable web-backup.service + +[root@$host ~]# systemctl enable web-backup.timer +``` +3. Set the permissions for the file to be executable.
+`[root@$host ~]# chmod +x /usr/local/sbin/web-backup.sh` +4. Once the symlinks are created, go ahead and start the services manually:
+`[root@$host ~]# systemctl start web-backup.timer web-backup.service` +5. Then check on the statuses of both the timer and the service:
+``` +[root@$host ~]# systemctl status web-backup.timer + +[root@$host ~]# systemctl status web-backup.service +``` +They both show as running, meaning this server is ready to go back to the Dev team. + +## Working with System Service Log Files Using the Journal Control: +This is to understand how to use the built-in journalctl utility to view and troubleshoot system services. + +## _Check the Web Server Configuration File_: +1. Change to the root account:
+`sudo su -` +2. Check the status of the web service:
+`systemctl status httpd.service` +3.Attempt to start the web service:
+`systemctl start httpd.service` +4. After the service fails to start, check the journal:
+`journalctl -u httpd.service` +5. Check the directory where the httpd configuration file should be:
+`ls /etc/httpd/conf` +6. Restore the original httpd configuration file:
+`mv /etc/httpd/conf/httpd.conf.bkup /etc/httpd/conf/httpd.conf` +7. Restart the service:
+`systemctl restart httpd.service` + +## _Verify That the Web Server Service Is Running_: +1. Check the status of the service:
+`systemctl status httpd.service` +2. Navigate to the local web page:
+`elinks http://localhost` + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab2/README.md b/Cloud/0-linux/lab2/README.md index 8178861f..4a507751 100644 --- a/Cloud/0-linux/lab2/README.md +++ b/Cloud/0-linux/lab2/README.md @@ -1,149 +1,149 @@ -# Securely Accessing Your System - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## Generating and Exchanging SSH Keys for Secure Access -Understand how to create secure keys for remote access, how to exchange them, and where to store them on each system involved in the chain. - -## _Create the Key on Server 1_: -1. In your terminal, log in to Server 1:
-`ssh cloud_user@<SERVER1_PUBLIC_IP>` -2. List the contents of the current directory:
-`ls -la` -3. Change to the .ssh directory:
-`cd .ssh` -4. List the contents of the .ssh directory:
-`ls -la` -5. Generate a key for Server 1:
-`ssh-keygen` -6. Press `Enter` at the next three prompts. -7. List the contents of the .ssh directory again:
-`ls -la` -8. List the contents of the id_rsa.pub file:
-`cat id_rsa.pub` -9. Copy the output of this command to your clipboard. - -## _Create the Key on Server 2_: -1. Log in to Server 2:
-`ssh cloud_user@<SERVER2_PUBLIC_IP>` -2. Change to the .ssh directory. -3. List the contents of the .ssh directory:
-`ls -la` -4. Install the nano text editor: -`sudo yum install nano` -5. Enter your password at the prompt. -6. Open the authorized_keys file in nano: -`nano authorized_keys` -7. Add the key we just generated to the file. -8. Press `Ctrl + X`. -9. Press `Y` then Enter to save the changes. - -## _Exchange the SSH Keys between Server 1 and Server 2_: -1. In your Server 2 terminal window, create a new key:
-`ssh-keygen` -2. Press Enter for the next three prompts. -3. List the contents of the current directory:
-`ls -la` -4. List the contents of the id_rsa.pub file: -`cat id_rsa.pub` -5. Copy the output of this command to your clipboard. -6. Type `exit` to log out of Server 2. -7. Install nano:
-`sudo yum install nano` -8. Type `y` to continue. -9. List the contents of the current directory: -`ls -la` -10. Open the authorized_keys file in nano: -`nano authorized_keys` -11. Add the key we just generated to the file. -12. Press `Ctrl + X`. -13. Press `Y` then Enter to save the changes. - -## _Test the Configuration_: -1. Attempt to log in to Server 2 from Server 1 without a password: -`ssh cloud_user@<SERVER2PUBLIC_IP>` -2. Attempt to log in to Server 1 from Server 2 without a password: -`ssh cloud_user@<SERVER1PUBLIC_IP>` - -## Create and Use an SSH Tunnel for Network Traffic: - -## _Generating ssh key_: -`ssh-keygen`
-Enter the following parameters - -## _Copying the key_: -`ssh-copy-id @` - -## _Login the key_: -`ssh @` - -## _Creating the tunnel_: -`ssh -f @ -L port: -N` - -## _Testing_: -`curl localhost:2000`
-Output:
-`Webpage worked` - -## Configure sshd to use Sockets: -1. Verify that the sshd.socket unit is not active: -`systemctl status sshd.socket` -2. Set up an at job that stops the sshd.service unit and starts sshd.socket: -`sudo at now + 3 minutes` -3. Enter your password at the prompt. -4. Add the following: -``` -at> systemctl stop sshd.service -at> systemctl start sshd.socket -``` -5. Press `Ctrl + D` to end the at job configuration. -6. Verify that the sshd.socket unit is active and running.
-`systemctl status sshd.socket` -7. Enable the socket for SSH and disable the service for SSH:
-``` -sudo systemctl enable sshd.socket -sudo systemctl disable sshd.service -``` - -## Set Up TCP Wrappers to Only Allow SSH -1. Verify that the sshd server has been compiled to use TCP wrappers:
-`ldd /usr/sbin/sshd | grep libwrap` -2. Edit the /etc/hosts.allow file:
-`sudo vim /etc/hosts.allow` -3. Add the following line to the file:
-`sshd2 sshd : ALL` -4. Edit the /etc/hosts.deny file:
-`sudo vim /etc/hosts.deny` -5. Add the following line to the file:
-`ALL : ALL` -6. Exit the SSH session:
-`exit` -7. Reconnect to the secure shell session:
-`ssh cloud_user@<PUBLIC_IP>`
-Enter your password at the prompt. - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Securely Accessing Your System + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## Generating and Exchanging SSH Keys for Secure Access +Understand how to create secure keys for remote access, how to exchange them, and where to store them on each system involved in the chain. + +## _Create the Key on Server 1_: +1. In your terminal, log in to Server 1:
+`ssh cloud_user@<SERVER1_PUBLIC_IP>` +2. List the contents of the current directory:
+`ls -la` +3. Change to the .ssh directory:
+`cd .ssh` +4. List the contents of the .ssh directory:
+`ls -la` +5. Generate a key for Server 1:
+`ssh-keygen` +6. Press `Enter` at the next three prompts. +7. List the contents of the .ssh directory again:
+`ls -la` +8. List the contents of the id_rsa.pub file:
+`cat id_rsa.pub` +9. Copy the output of this command to your clipboard. + +## _Create the Key on Server 2_: +1. Log in to Server 2:
+`ssh cloud_user@<SERVER2_PUBLIC_IP>` +2. Change to the .ssh directory. +3. List the contents of the .ssh directory:
+`ls -la` +4. Install the nano text editor: +`sudo yum install nano` +5. Enter your password at the prompt. +6. Open the authorized_keys file in nano: +`nano authorized_keys` +7. Add the key we just generated to the file. +8. Press `Ctrl + X`. +9. Press `Y` then Enter to save the changes. + +## _Exchange the SSH Keys between Server 1 and Server 2_: +1. In your Server 2 terminal window, create a new key:
+`ssh-keygen` +2. Press Enter for the next three prompts. +3. List the contents of the current directory:
+`ls -la` +4. List the contents of the id_rsa.pub file: +`cat id_rsa.pub` +5. Copy the output of this command to your clipboard. +6. Type `exit` to log out of Server 2. +7. Install nano:
+`sudo yum install nano` +8. Type `y` to continue. +9. List the contents of the current directory: +`ls -la` +10. Open the authorized_keys file in nano: +`nano authorized_keys` +11. Add the key we just generated to the file. +12. Press `Ctrl + X`. +13. Press `Y` then Enter to save the changes. + +## _Test the Configuration_: +1. Attempt to log in to Server 2 from Server 1 without a password: +`ssh cloud_user@<SERVER2PUBLIC_IP>` +2. Attempt to log in to Server 1 from Server 2 without a password: +`ssh cloud_user@<SERVER1PUBLIC_IP>` + +## Create and Use an SSH Tunnel for Network Traffic: + +## _Generating ssh key_: +`ssh-keygen`
+Enter the following parameters + +## _Copying the key_: +`ssh-copy-id @` + +## _Login the key_: +`ssh @` + +## _Creating the tunnel_: +`ssh -f @ -L port: -N` + +## _Testing_: +`curl localhost:2000`
+Output:
+`Webpage worked` + +## Configure sshd to use Sockets: +1. Verify that the sshd.socket unit is not active: +`systemctl status sshd.socket` +2. Set up an at job that stops the sshd.service unit and starts sshd.socket: +`sudo at now + 3 minutes` +3. Enter your password at the prompt. +4. Add the following: +``` +at> systemctl stop sshd.service +at> systemctl start sshd.socket +``` +5. Press `Ctrl + D` to end the at job configuration. +6. Verify that the sshd.socket unit is active and running.
+`systemctl status sshd.socket` +7. Enable the socket for SSH and disable the service for SSH:
+``` +sudo systemctl enable sshd.socket +sudo systemctl disable sshd.service +``` + +## Set Up TCP Wrappers to Only Allow SSH +1. Verify that the sshd server has been compiled to use TCP wrappers:
+`ldd /usr/sbin/sshd | grep libwrap` +2. Edit the /etc/hosts.allow file:
+`sudo vim /etc/hosts.allow` +3. Add the following line to the file:
+`sshd2 sshd : ALL` +4. Edit the /etc/hosts.deny file:
+`sudo vim /etc/hosts.deny` +5. Add the following line to the file:
+`ALL : ALL` +6. Exit the SSH session:
+`exit` +7. Reconnect to the secure shell session:
+`ssh cloud_user@<PUBLIC_IP>`
+Enter your password at the prompt. + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab3/README.md b/Cloud/0-linux/lab3/README.md index a5f8f490..c13f9fd1 100644 --- a/Cloud/0-linux/lab3/README.md +++ b/Cloud/0-linux/lab3/README.md @@ -1,107 +1,107 @@ -# Package Management and Troubleshooting - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## Installing and Managing Packages on Debian/Ubuntu Systems -Understanding how to use package manager and installation utility apt to manage packages on Ubuntu/Debian Linux distributions. - -## _Install the Apache Web Server Package_: -> Note: Ubuntu/Debian systems will usually start a service automatically, once its package is installed. You may need to update the package manager. - -## _Update package_: -`sudo apt update` - -## _Install the packages_: -`sudo apt install apache2 wget` - -## _Verify the Server is Running and Capture the Result_: -1. Checking Apache server:
-`curl http://localhost` -2. If that's working, we use the wget package to capture the output of an http request. We'll point the output to a file in our home directory called local_index.response
-`wget --output-document=local_index.response http://localhost` - - -## Installing and Managing Packages on Red Hat/CentOS Systems -1. Attempt to install the RPM to determine what dependencies are required:
-``` -cd Downloads -sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm -``` -> We'll get some dependency errors (version numbers may vary). -2. Use the package manager to determine which packages provide the dependencies:
-`sudo yum provides libmozjs185*`
-> The output shows that the js package provides libmozjs185. -3. Install the packages that provide those dependencies:
-`sudo yum install js` -4. All of our dependencies were not resolved with that one package installation. Attempt to install the RPM again. If any other dependencies are needed, repeat steps 3 and 4 (substituting libmozjs185 with whatever dependency is still missing) to resolve that issue:
-`sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm` -5. Once the RPM is installed successfully, run elinks to ensure the application is working properly:
-`elinks` -6. Attempt to open a website by providing a URL:
-`http://www.amazon.com` - -## Troubleshooting RPM Issues: -Understand how to install telnet and install Apache. - -1. Become the root user:
-`sudo -i` - -## _Telnet Installation_: -1. Install the telnet package:
-`yum install -y telnet` -2. Verify the integrity of the RPM database:
-``` -cd /var/lib/rpm/ -/usr/lib/rpm/rpmdb_verify Packages -``` -3. Move Packages to Packages.bad and create a new RPM database from Packages.bad:
-``` -mv Packages Packages.bad -/usr/lib/rpm/rpmdb_dump Packages.bad | /usr/lib/rpm/rpmdb_load Packages -``` -4. Verify the integrity of the new RPM database:
-`/usr/lib/rpm/rpmdb_verify Packages` -5. Query installed packages for errors:
-`rpm -qa > /dev/null` -6. Rebuild the RPM database:
-`rpm -vv --rebuilddb` -7. Install telnet:
-`yum install -y telnet` - -## _Update Apache_: -1. Attempt to install Apache:
-`yum install -y httpd` -2. Edit /etc/yum.conf:
-`vim /etc/yum.conf` -3. Remove the exclusion for httpd:
-`exclude=httpd` -4. Save and close the file:
-`:wq` -5. Install Apache:
-`yum install -y httpd` - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Package Management and Troubleshooting + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## Installing and Managing Packages on Debian/Ubuntu Systems +Understanding how to use package manager and installation utility apt to manage packages on Ubuntu/Debian Linux distributions. + +## _Install the Apache Web Server Package_: +> Note: Ubuntu/Debian systems will usually start a service automatically, once its package is installed. You may need to update the package manager. + +## _Update package_: +`sudo apt update` + +## _Install the packages_: +`sudo apt install apache2 wget` + +## _Verify the Server is Running and Capture the Result_: +1. Checking Apache server:
+`curl http://localhost` +2. If that's working, we use the wget package to capture the output of an http request. We'll point the output to a file in our home directory called local_index.response
+`wget --output-document=local_index.response http://localhost` + + +## Installing and Managing Packages on Red Hat/CentOS Systems +1. Attempt to install the RPM to determine what dependencies are required:
+``` +cd Downloads +sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm +``` +> We'll get some dependency errors (version numbers may vary). +2. Use the package manager to determine which packages provide the dependencies:
+`sudo yum provides libmozjs185*`
+> The output shows that the js package provides libmozjs185. +3. Install the packages that provide those dependencies:
+`sudo yum install js` +4. All of our dependencies were not resolved with that one package installation. Attempt to install the RPM again. If any other dependencies are needed, repeat steps 3 and 4 (substituting libmozjs185 with whatever dependency is still missing) to resolve that issue:
+`sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm` +5. Once the RPM is installed successfully, run elinks to ensure the application is working properly:
+`elinks` +6. Attempt to open a website by providing a URL:
+`http://www.amazon.com` + +## Troubleshooting RPM Issues: +Understand how to install telnet and install Apache. + +1. Become the root user:
+`sudo -i` + +## _Telnet Installation_: +1. Install the telnet package:
+`yum install -y telnet` +2. Verify the integrity of the RPM database:
+``` +cd /var/lib/rpm/ +/usr/lib/rpm/rpmdb_verify Packages +``` +3. Move Packages to Packages.bad and create a new RPM database from Packages.bad:
+``` +mv Packages Packages.bad +/usr/lib/rpm/rpmdb_dump Packages.bad | /usr/lib/rpm/rpmdb_load Packages +``` +4. Verify the integrity of the new RPM database:
+`/usr/lib/rpm/rpmdb_verify Packages` +5. Query installed packages for errors:
+`rpm -qa > /dev/null` +6. Rebuild the RPM database:
+`rpm -vv --rebuilddb` +7. Install telnet:
+`yum install -y telnet` + +## _Update Apache_: +1. Attempt to install Apache:
+`yum install -y httpd` +2. Edit /etc/yum.conf:
+`vim /etc/yum.conf` +3. Remove the exclusion for httpd:
+`exclude=httpd` +4. Save and close the file:
+`:wq` +5. Install Apache:
+`yum install -y httpd` + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab4/README.md b/Cloud/0-linux/lab4/README.md index 32cbd89a..468c5b67 100644 --- a/Cloud/0-linux/lab4/README.md +++ b/Cloud/0-linux/lab4/README.md @@ -1,291 +1,293 @@ -# File Management, Permissions and Backup - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -March, 2022 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - - -## Creating a Directory Structure in Linux: -Understanding how to create a certain directory and subdirectory structure, plus a couple of empty text files. - -## _Create the Parent Directories_: -> By Hand: - -``` -[cloud_user@host]$ mkdir -p Projects/ancient -[cloud_user@host]$ mkdir Projects/classical -[cloud_user@host]$ mkdir Projects/medieval -``` -> With Bash Expansion: - -`[cloud_user@host]$ mkdir -p Projects/{ancient,classical,medieval}` - -## _Create the Subdirectories_: -> By Hand: -``` -[cloud_user@host]$ mkdir Projects/ancient/egyptian -[cloud_user@host]$ mkdir Projects/ancient/nubian -[cloud_user@host]$ mkdir Projects/classical/greek -[cloud_user@host]$ mkdir Projects/medieval/britain -[cloud_user@host]$ mkdir Projects/medieval/japan -``` -> With Bash Expansion: -``` -[cloud_user@host]$ mkdir Projects/ancient/{egyptian,nubian} -[cloud_user@host]$ mkdir Projects/classical/greek -[cloud_user@host]$ mkdir Projects/medieval/{britain,japan} -``` -## _Create Some Empty Files_: -``` -[cloud_user@host]$ touch Projects/ancient/nubian/further_research.txt -[cloud_user@host]$ touch Projects/classical/greek/further_research.txt -``` -## _Rename a Subdirectory_: -`[cloud_user@host]$ mv Projects/classical Projects/greco-roman` - -## Working with Compressed Files in Linux: -## _Get the Original File Size_:
-`[cloud_user@host]$ ls -lh junk.txt` - -## _Creating zip Files_: -> Gzip -1. Compressing data:
-`[cloud_user@host]$ gzip junk.txt` -2. Run ls to view the size of the file:
-`[cloud_user@host]$ ls -lh` -3. Unzip:
-`[cloud_user@host]$ gunzip junk.txt.gz` - -> bzip -1. Compression method instead:
-`[cloud_user@host]$ bzip2 junk.txt` -2. Run ls to view the size of the file:
-`[cloud_user@host]$ ls -lh junk.txt.bz2` -3. Unzip:
-`[cloud_user@host]$ bunzip2 junk.txt.bz2` - -> XZ -1. Compression method instead:
-`[cloud_user@host]$ xz junk.txt` -2. Run ls to view the size of the file:
-`[cloud_user@host]$ ls -lh` -3. Unzip:
-`[cloud_user@host]$ unxz junk.txt.xz` - -## _Creating tar Files_: -1. Compression method instead:
-`[cloud_user@host]$ tar -cvzf gztar.tar.gz junk.txt` -2. Then, let's make one using bzip2:
-`[cloud_user@host]$ tar -cvjf bztar.tar.bz2 junk.txt` -3. Finally, we'll use XZ to make one:
-`[cloud_user@host]$ tar -cvJf xztar.tar.xz junk.txt` -4. Run the ls command again to compare the file sizes:
-`[cloud_user@host]$ ls -lh` - -## _Practice Reading Compressed Text Files_: -How to read the contents of compressed files without having to actually decompress them? There is a way! Let's do that now. First, let's copy over the /etc/passwd file to your home directory: -`[cloud_user@host]$ cp /etc/passwd /home/cloud_user/` - -> Gzip -1. Compression method instead:
-`[cloud_user@host]$ tar -cvzf passwd.tar.gz passwd` -2. And we can use the zcat command to read this compressed file:
-`[cloud_user@host]$ zcat passwd.tar.gz` - -> bzip2 -1. Now let's compress the file, using bzip2, into a tarball:
-`[cloud_user@host]$ tar -cvjf passwd.tar.bz2 passwd` -2. We can use the bzcat command to read the compressed file:
-`[cloud_user@host]$ bzcat passwd.tar.bz2` - -> XZ -1. Finally, let's create an xz tar file:
-`[cloud_user@host]$ tar -cvJf passwd.tar.xz passwd` -2. And we can use the xzcat command to read its contents:
-`[cloud_user@host]$ xzcat passwd.tar.xz` - -## Managing File Attributes and Permissions: -## _Objectives_: -1. Reset a directory's permissions to the following: - - Everyone can access the directory - - Everyone can read the files in the directory - - No one can execute files in the directory -2. Apply all of these permissions to all subdirectories recursively - -## _Grant Access to the Directory_: -1. Change to the opt directory:
-`cd /opt` -2. Next, open all of the directory's files and permissions with the following command:
-`ls -la` -3. Let's try to access the myapp directory. Run the following command:
-`cd myapp/` -4. How to fix "Permission denied": -`sudo chmod 777 myapp` -5. Reopen the directory files and permissions using the ls -la command. Now let's try to open the directory again: -`cd myapp` - -## _Change the Directory Permissions_: -1. Give all users read and write permissions for this directory:
-`sudo chmod -f -x -R *` -> Just everyone read and write permissions -`sudo chmod 666 -f -R *` -2. List the directory files and permissions again:
-`ls -la` -3. How to set the directories as executable:
-`sudo find /opt/myapp -type d -exec chmod o+x {} \;` - -## _Create a Symbolic (Soft) Link_: -1. Creating a symbolic (or soft) link from the /etc/redhat-release file to a new link file named release in the home directory:
-`ln -s /etc/redhat-release release` -2. Verify if the link is valid:
-`ls -l` -3. Check if you can read the file's contents:
-`cat release` -4. Check the link's contents:
-`cat /etc/redhat-release` -> Should be the same - -## _Check the Inode Numbers for the Link_: -1. Look at the inode number of /home/cloud_user/release:
-`ls -i release` -2. Check the inode number for /etc/redhat-release:
-`ls -i /etc/redhat-release` -> They should be different, as the symbolic link is just a new filesystem entry that references the original file. - -## _Create a Hard Link_: -1. Create docs directory:
-`mkdir docs` -2. Copy /etc/services into the docs directory:
-`cp /etc/services docs/` -3. Create a hard link from the /home/cloud_user/docs/services file to a new link location named /home/cloud_user/services:
-`ln docs/services services` -4. Check the link's inode number as well as the inode number for the original /etc/services:
-`ls -l` -5. View the contents of the inodes:
-> This should verify for us that this is a hard link, not a soft link. It won't have an arrow pointing to the actual file it's linked to, like a soft link does. Just to verify, check these two with cat and make sure they're the same: -``` -ls -i services -ls -i docs/services -``` -> You should see they the same inode number, meaning they're essentially the same file. - -## _Attempt to Create a Hard Link Across Filesystems_: -1. View the individual block devices:
-`lsblk` -> Each partition has its own set of inodes, hard links across partitions don't work. Soft links should. -2. Trying to make a hard link from /home/cloud_user/docs/services to /opt/services:
-`ln /home/cloud_user/docs/services /opt/services` -> Should get a failed to create hard link error - -## _Attempt to Create a Soft Link Across Filesystems_: -1. Trying to make the same sort of cross-partition link, using the -s flag to make it a soft link:
-`sudo ln -s /etc/redhat-release /opt/release` -> There shouldn't be any output, meaning it was successful. -2. View the contents of the inodes again:
-``` -ls -i /etc/redhat-release -ls -i /opt/release -``` -> You should see they have different inodes, but the linking will work. - -## Encrypt a File Using GPG: -Understand how to new public GPG key, encrypt a file and sign it, and send that file to another user to decrypt with "A Cloud Guru" public key. - -## _Create a GPG Key for cloud user_: -1. Generate a new GPG key:
-`[cloud_user@host]$ gpg --gen-key` -2. Credentials: -> Accept the defaults for each prompt. For the user ID, enter cloud_user, and use cloud_user@localhost for the email address. We can leave the comment field blank by just pressing Enter, and press o at the end for OK. -> We'll use password321 when we're prompted for a passphrase, and when we're prompted to confirm it. -3. Now that the key has been created, we need to export it so that Gordon Freeman can decrypt files he gets from us. We'll do that like this:
-`[cloud_user@host]$ gpg -a -o gfreeman.key --export <KEY_ID>` -4. In that command, use the public key reference ID from the output of the key generation. It will be a random string, and the line it's sitting on (in the key generation output) looks like this:
- `gpg: key XXXXXXXX marked as ultimately trusted` -5. Now, we'll use the mail command to send an email to Gordon Freeman containing the cloud_user public key as an attachment:
-``` -[cloud_user@host]$ mail -s "here is your key" -a gfreeman.key gfreeman@localhost` -Don't lose this! I'll call you with the passphrase. -. -``` -> Include that final period (on the line by itself) and then press Enter to send the message. - -## _Configure GPG for Gordon_: -1. Just as we did with the cloud_user account, we'll generate a GPG key for Mr. Freeman, accepting the defaults for each prompt. The only difference will be having a user ID of gfreeman and an email address of gfreeman@localhost:
-`[gfreeman@host]$ gpg --gen-key` -2. Once we've created the key for Mr. Freeman, we can open up the mutt email client, and save the public key sent over by the cloud_user account:
-`[gfreeman@host]$ mutt` -> Arrow up and down to highlight the cloud_user message, then press Enter. Press v to view the attachment, and press s to save it to Mr. Freeman's home directory. Finally, press q to quit Mutt. -3. Now, to import the public key from cloud_user into Mr. Freeman's keyring, run the following command:
-`[gfreeman@host]$ gpg --import gfreeman.key` -4. We can run this to view the contents of Mr. Freeman's keyring:
-`[gfreeman@host]$ gpg --list-keys` -5. Let's log out of gfreeman's account:
-`[gfreeman@host]$ exit` - -## _Generate a Signed Document and Send It to Gordon_: -1. When we digitally sign a file, we are using our private GPG key to guarantee that this file came from us. The user that receives the file will use their copy of the public key from us to verify that we signed the file. Let's generate a test document:
-`[cloud_user@host]$ echo "Just need you to verify this file." > note.txt` -2. Now we'll use cloud_user's private key to sign the file:
-`[cloud_user@host]$ gpg --clearsign note.txt` -> Remember that we need to use the passphrase we created earlier (password321). -> Now there should now be a note.txt.asc file in cloud_user's home directory. We can run a quick ls to make sure. -3. Now that we've made the file, let's email it to gfreeman@localhost:
-``` -[cloud_user@host]$ mail -s "check this out" -a note.txt.asc gfreeman@localhost -Could you verify this file for me? -. -``` - -## _Verify the Signature of the Emailed Document_: -> Use the mutt email client, and just as before, view and save the new email message's attachment. -1. Now, verify the note.txt.asc file that was emailed:
-`[gfreeman@host]$ gpg --verify note.txt.asc` -2. We'll get a warning about the signature not being verified by a third party, and that's ok. What is important is the following line from the output:
-`gpg: Good signature from "cloud_user "` -> This is what a verified file displays. -3. Next, encrypt a copy of the /etc/fstab file like this:
-``` -[gfreeman@host]$ cp /etc/fstab ~ -[gfreeman@host]$ gpg -a -r cloud_user -e ~/fstab -``` -> You will see a general warning displayed about the key possibly not belonging to the named person. We already know that this key is from cloud_user, so just press y at the prompt. -4. Verify that there is a file called fstab.asc in the gfreeman home directory (by running ls). Create a new email to cloud_user and attach this file:
-``` -[gfreeman@host]$ mail -s "looks good" -a fstab.asc cloud_user@localhost -Can you decrypt this? -. -``` -5. Log out:
-`[gfreeman@host]$ exit` - -## _Decrypt the Attached File_: -> Now, as cloud_user, open up the mutt email client and save the fstab.asc attachment from the new email. -1. Decrypt the saved fstab.asc file with the gpg command, and enter the passphrase for cloud_user's key when prompted:
-`[cloud_user@host]$ gpg fstab.asc` -2. Now let's verify that we can read the contents of the decrypted file:
-`[cloud_user@host]$ cat fstab` - - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# File Management, Permissions and Backup + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +March, 2022 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + + +## Creating a Directory Structure in Linux: +Understanding how to create a certain directory and subdirectory structure, plus a couple of empty text files. + +## _Create the Parent Directories_: +> By Hand: + +``` +[cloud_user@host]$ mkdir -p Projects/ancient +[cloud_user@host]$ mkdir Projects/classical +[cloud_user@host]$ mkdir Projects/medieval +``` +> With Bash Expansion: + +`[cloud_user@host]$ mkdir -p Projects/{ancient,classical,medieval}` + +## _Create the Subdirectories_: +> By Hand: +``` +[cloud_user@host]$ mkdir Projects/ancient/egyptian +[cloud_user@host]$ mkdir Projects/ancient/nubian +[cloud_user@host]$ mkdir Projects/classical/greek +[cloud_user@host]$ mkdir Projects/medieval/britain +[cloud_user@host]$ mkdir Projects/medieval/japan +``` +> With Bash Expansion: +``` +[cloud_user@host]$ mkdir Projects/ancient/{egyptian,nubian} +[cloud_user@host]$ mkdir Projects/classical/greek +[cloud_user@host]$ mkdir Projects/medieval/{britain,japan} +``` +## _Create Some Empty Files_: +``` +[cloud_user@host]$ touch Projects/ancient/nubian/further_research.txt +[cloud_user@host]$ touch Projects/classical/greek/further_research.txt +``` +## _Rename a Subdirectory_: +`[cloud_user@host]$ mv Projects/classical Projects/greco-roman` + +## Working with Compressed Files in Linux: +## _Get the Original File Size_:
+`[cloud_user@host]$ ls -lh junk.txt` + +## _Creating zip Files_: +> Gzip +1. Compressing data:
+`[cloud_user@host]$ gzip junk.txt` +2. Run ls to view the size of the file:
+`[cloud_user@host]$ ls -lh` +3. Unzip:
+`[cloud_user@host]$ gunzip junk.txt.gz` + +> bzip +1. Compression method instead:
+`[cloud_user@host]$ bzip2 junk.txt` +2. Run ls to view the size of the file:
+`[cloud_user@host]$ ls -lh junk.txt.bz2` +3. Unzip:
+`[cloud_user@host]$ bunzip2 junk.txt.bz2` + +> XZ +1. Compression method instead:
+`[cloud_user@host]$ xz junk.txt` +2. Run ls to view the size of the file:
+`[cloud_user@host]$ ls -lh` +3. Unzip:
+`[cloud_user@host]$ unxz junk.txt.xz` + +## _Creating tar Files_: +1. Compression method instead:
+`[cloud_user@host]$ tar -cvzf gztar.tar.gz junk.txt` +2. Then, let's make one using bzip2:
+`[cloud_user@host]$ tar -cvjf bztar.tar.bz2 junk.txt` +3. Finally, we'll use XZ to make one:
+`[cloud_user@host]$ tar -cvJf xztar.tar.xz junk.txt` +4. Run the ls command again to compare the file sizes:
+`[cloud_user@host]$ ls -lh` + +## _Practice Reading Compressed Text Files_: +How to read the contents of compressed files without having to actually decompress them? There is a way! Let's do that now. First, let's copy over the /etc/passwd file to your home directory: +`[cloud_user@host]$ cp /etc/passwd /home/cloud_user/` + +> Gzip +1. Compression method instead:
+`[cloud_user@host]$ tar -cvzf passwd.tar.gz passwd` +2. And we can use the zcat command to read this compressed file:
+`[cloud_user@host]$ zcat passwd.tar.gz` + +> bzip2 +1. Now let's compress the file, using bzip2, into a tarball:
+`[cloud_user@host]$ tar -cvjf passwd.tar.bz2 passwd` +2. We can use the bzcat command to read the compressed file:
+`[cloud_user@host]$ bzcat passwd.tar.bz2` + +> XZ +1. Finally, let's create an xz tar file:
+`[cloud_user@host]$ tar -cvJf passwd.tar.xz passwd` +2. And we can use the xzcat command to read its contents:
+`[cloud_user@host]$ xzcat passwd.tar.xz` + +## Managing File Attributes and Permissions: +## _Objectives_: +1. Reset a directory's permissions to the following: + - Everyone can access the directory + - Everyone can read the files in the directory + - No one can execute files in the directory +2. Apply all of these permissions to all subdirectories recursively + +## _Grant Access to the Directory_: +1. Change to the opt directory:
+`cd /opt` +2. Next, open all of the directory's files and permissions with the following command:
+`ls -la` +3. Let's try to access the myapp directory. Run the following command:
+`cd myapp/` +4. How to fix "Permission denied": +`sudo chmod 777 myapp` +5. Reopen the directory files and permissions using the ls -la command. Now let's try to open the directory again: +`cd myapp` + +## _Change the Directory Permissions_: +1. Give all users read and write permissions for this directory:
+`sudo chmod -f -x -R *` +> Just everyone read and write permissions +`sudo chmod 666 -f -R *` +2. List the directory files and permissions again:
+`ls -la` +3. How to set the directories as executable:
+`sudo find /opt/myapp -type d -exec chmod o+x {} \;` + +## _Create a Symbolic (Soft) Link_: +1. Creating a symbolic (or soft) link from the /etc/redhat-release file to a new link file named release in the home directory:
+`ln -s /etc/redhat-release release` +2. Verify if the link is valid:
+`ls -l` +3. Check if you can read the file's contents:
+`cat release` +4. Check the link's contents:
+`cat /etc/redhat-release` +> Should be the same + +## _Check the Inode Numbers for the Link_: +1. Look at the inode number of /home/cloud_user/release:
+`ls -i release` +2. Check the inode number for /etc/redhat-release:
+`ls -i /etc/redhat-release` +> They should be different, as the symbolic link is just a new filesystem entry that references the original file. + +## _Create a Hard Link_: +1. Create docs directory:
+`mkdir docs` +2. Copy /etc/services into the docs directory:
+`cp /etc/services docs/` +3. Create a hard link from the /home/cloud_user/docs/services file to a new link location named /home/cloud_user/services:
+`ln docs/services services` +4. Check the link's inode number as well as the inode number for the original /etc/services:
+`ls -l` +5. View the contents of the inodes:
+> This should verify for us that this is a hard link, not a soft link. It won't have an arrow pointing to the actual file it's linked to, like a soft link does. Just to verify, check these two with cat and make sure they're the same: +``` +ls -i services +ls -i docs/services +``` +> You should see they the same inode number, meaning they're essentially the same file. + +## _Attempt to Create a Hard Link Across Filesystems_: +1. View the individual block devices:
+`lsblk` +> Each partition has its own set of inodes, hard links across partitions don't work. Soft links should. +2. Trying to make a hard link from /home/cloud_user/docs/services to /opt/services:
+`ln /home/cloud_user/docs/services /opt/services` +> Should get a failed to create hard link error + +## _Attempt to Create a Soft Link Across Filesystems_: +1. Trying to make the same sort of cross-partition link, using the -s flag to make it a soft link:
+`sudo ln -s /etc/redhat-release /opt/release` +> There shouldn't be any output, meaning it was successful. +2. View the contents of the inodes again:
+``` +ls -i /etc/redhat-release +ls -i /opt/release +``` +> You should see they have different inodes, but the linking will work. + +## Encrypt a File Using GPG: +Understand how to new public GPG key, encrypt a file and sign it, and send that file to another user to decrypt with "A Cloud Guru" public key. + +## _Create a GPG Key for cloud user_: +1. Generate a new GPG key:
+`[cloud_user@host]$ gpg --gen-key` +2. Credentials: +> Accept the defaults for each prompt. For the user ID, enter cloud_user, and use cloud_user@localhost for the email address. We can leave the comment field blank by just pressing Enter, and press o at the end for OK. +> We'll use password321 when we're prompted for a passphrase, and when we're prompted to confirm it. +3. Now that the key has been created, we need to export it so that Gordon Freeman can decrypt files he gets from us. We'll do that like this:
+`[cloud_user@host]$ gpg -a -o gfreeman.key --export <KEY_ID>` +4. In that command, use the public key reference ID from the output of the key generation. It will be a random string, and the line it's sitting on (in the key generation output) looks like this:
+ `gpg: key XXXXXXXX marked as ultimately trusted` +5. Now, we'll use the mail command to send an email to Gordon Freeman containing the cloud_user public key as an attachment:
+``` +[cloud_user@host]$ mail -s "here is your key" -a gfreeman.key gfreeman@localhost` +Don't lose this! I'll call you with the passphrase. +. +``` +> Include that final period (on the line by itself) and then press Enter to send the message. + +## _Configure GPG for Gordon_: +1. Just as we did with the cloud_user account, we'll generate a GPG key for Mr. Freeman, accepting the defaults for each prompt. The only difference will be having a user ID of gfreeman and an email address of gfreeman@localhost:
+`[gfreeman@host]$ gpg --gen-key` +2. Once we've created the key for Mr. Freeman, we can open up the mutt email client, and save the public key sent over by the cloud_user account:
+`[gfreeman@host]$ mutt` +> Arrow up and down to highlight the cloud_user message, then press Enter. Press v to view the attachment, and press s to save it to Mr. Freeman's home directory. Finally, press q to quit Mutt. +3. Now, to import the public key from cloud_user into Mr. Freeman's keyring, run the following command:
+`[gfreeman@host]$ gpg --import gfreeman.key` +4. We can run this to view the contents of Mr. Freeman's keyring:
+`[gfreeman@host]$ gpg --list-keys` +5. Let's log out of gfreeman's account:
+`[gfreeman@host]$ exit` + +## _Generate a Signed Document and Send It to Gordon_: +1. When we digitally sign a file, we are using our private GPG key to guarantee that this file came from us. The user that receives the file will use their copy of the public key from us to verify that we signed the file. Let's generate a test document:
+`[cloud_user@host]$ echo "Just need you to verify this file." > note.txt` +2. Now we'll use cloud_user's private key to sign the file:
+`[cloud_user@host]$ gpg --clearsign note.txt` +> Remember that we need to use the passphrase we created earlier (password321). +> Now there should now be a note.txt.asc file in cloud_user's home directory. We can run a quick ls to make sure. +3. Now that we've made the file, let's email it to gfreeman@localhost:
+``` +[cloud_user@host]$ mail -s "check this out" -a note.txt.asc gfreeman@localhost +Could you verify this file for me? +. +``` + +## _Verify the Signature of the Emailed Document_: +> Use the mutt email client, and just as before, view and save the new email message's attachment. +1. Now, verify the note.txt.asc file that was emailed:
+`[gfreeman@host]$ gpg --verify note.txt.asc` +2. We'll get a warning about the signature not being verified by a third party, and that's ok. What is important is the following line from the output:
+`gpg: Good signature from "cloud_user "` +> This is what a verified file displays. +3. Next, encrypt a copy of the /etc/fstab file like this:
+``` +[gfreeman@host]$ cp /etc/fstab ~ +[gfreeman@host]$ gpg -a -r cloud_user -e ~/fstab +``` +> You will see a general warning displayed about the key possibly not belonging to the named person. We already know that this key is from cloud_user, so just press y at the prompt. +4. Verify that there is a file called fstab.asc in the gfreeman home directory (by running ls). Create a new email to cloud_user and attach this file:
+``` +[gfreeman@host]$ mail -s "looks good" -a fstab.asc cloud_user@localhost +Can you decrypt this? +. +``` +5. Log out:
+`[gfreeman@host]$ exit` + +## _Decrypt the Attached File_: +> Now, as cloud_user, open up the mutt email client and save the fstab.asc attachment from the new email. +1. Decrypt the saved fstab.asc file with the gpg command, and enter the passphrase for cloud_user's key when prompted:
+`[cloud_user@host]$ gpg fstab.asc` +2. Now let's verify that we can read the contents of the decrypted file:
+`[cloud_user@host]$ cat fstab` + + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ + +Last updated: 2025-07-11 diff --git a/Cloud/0-linux/lab5/README.md b/Cloud/0-linux/lab5/README.md index 66976867..6550223a 100644 --- a/Cloud/0-linux/lab5/README.md +++ b/Cloud/0-linux/lab5/README.md @@ -1,142 +1,144 @@ -# Working with Text Files and Streams - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -March, 2022 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - - -## Modify a Text File Using sed: -> Someone got confused and wrote about cows instead of ants in a text file. We've got to replace all instances of cows and with Ants, regardless of whether or not cows contains any capital letters. -## _See File Content_: -1. Let's look at the file we're dealing with:
-`cat fable.txt` - -## _The Fix_: -1. Replace information -> We're going to run a sed command. The -i means "do this in place," as in don't create another file. The capital I near the end stands for "case-insensitive" and means that whether cows has any capital letters in it or not, change it to Ants. The g means do it globally, throughout the whole file.
- -`sed -i 's/cows/Ants/Ig' fable.txt` - -> Now if we run our cat command again, we'll see that all the cows are gone. - -## Working with Basic Regular Expressions: -Understand how to read some text files and redirecting some output (output that we'll decide on using regular expressions) to other text files. - -## _Locate HTTP Services_: -1. Read information: -> We want to read all of the lines in /etc/services that start with http (but not any that start with httpx) and send them to ~/http-services.txt
-`grep ^http[^x] /etc/services > ~/http-services.txt` -2. To check if we have what we want in the new file, run:
-`cat ~/http-services.txt` - -## _Locate a Specific Services_: -1. Search lines:
-> This one is a little trickier. We want to find all of the lines in /etc/services that start with ldap. The fifth character can be any alphanumeric character, but the sixth character can not be an a. We'll dump the output into ~/lpic1-ldap.txt
-`grep ^ldap.[^a] /etc/services > ~/lpic1-ldap.txt` -2. To check if we have what we want in the new file, run:
-`cat ~/lpic1-ldap.txt` - -## _Refine the HTTP Results_: -1. Search lines:
-> We want to read the ~/http-services.txt file that we created earlier, and just look at lines that don't end with the word service. This grep command will do it:
-`grep -v service$ ~/http-services.txt > ~/http-updated.txt` -2. To check if we have what we want in the new file, run:
-`cat ~/http-updated.txt` - -## Creating and Modifying a File with Vim: -Understand how to create a text file with Vim, and edit it. - -## _Create a New File_: -1.We're going to create a new file called notes.txt in /home/cloud_user:
-``` -cd -vim notes.txt -``` -> Now, to add the text Beginning of Notes File, we need to get into insert mode, by pressing i. We can start typing now once we're in insert mode. -2. Leave two blank lines after Beginning of Notes File. Now, to save the file and quit Vim, we have to first hit Esc (to get out of insert mode), type :wq! (write and quit). - -## _Send Data to notes.txt_: -1. Appends content:
-> Using the cat command and output redirection, send the contents of the /etc/redhat-release file to the end of the notes.txt file, taking care to append the contents so as to not overwrite the file (using >>, not >) -> Run this to append notes.txt with the contents of /etc/redhat-release:
-`cat /etc/redhat-release >> notes.txt` - -## _Modify notes.txt_: -> Let's open notes.txt again for editing. We'll place the cursor before the opening parenthesis around the word Core and use a keyboard shortcut to delete the text from there to the end of the line. We'll leave two more blank lines at the end of the file and then save and quit again. -> Here are all of the steps to do that: -1. Open the file:
-`vim notes.txt` -2. Use the arrow keys to move to the beginning parentheses before Core
-3. Remove text from the cursor's position to end of line:
-`SHIFT D (or d$)` -4. Create a blank line under where the cursor is:
-`o -5. Hit Enter to create the second blank line -6. Hit Esc to leave insert mode -7. Hitting o added a blank line, but also put us in insert mode -8. Write and quit:
-`:wq!` - -## _Send More Data to the File, and Modify Its Contents_: -> Now we're going to send free -m output to the end of notes.txt, edit notes.txt again, delete the last line of the file, and add two more blank lines to the end of the file. -> Then, we're going to jump to the third line of the file, enter some text, and make another blank line afterward. -> Here are all of the steps to do that: -1. Append the notes.txt:
-`free -m >> notes.txt` -2. Edit notes.txt:
-`vim notes.txt` -3. Navigate to the Swap line with arrow keys. -4. Delete the line:
-`dd` -5. Create a blank line under where the cursor is (and put us in insert mode):
-`o` -6. Hit Enter to create the second blank line. -7. Hit Esc to get out of insert mode. -8. Get to the 3rd line of file:
-`:3` -9. Get back into insert mode:
-`i` -10. Type This is a practice system. -11. Hit Enter to make another blank line. -12. Hit Esc to leave insert mode. -13. Write and quit:
-`:wq!` - -## Finalize the Notes File: -> We're going to dump one last bit of text into the file, then edit it again. We'll take the output from dbus-uuidgen --get, append it to notes.txt then edit notes.txt so that the text Dbus ID = is in the beginning of the new appended line. -> We'll do it like this: -1. Append the notes.txt:
-`dbus-uuidgen --get >> notes.txt` -2. Edit notes.txt:
-`vim notes.txt` -3. Get right to the end of the file:
-`G (Capital G)` -4. Get into insert mode:
-`i` -5. Type "Dbus ID = " (with a space between the equals sign and the dbus-uuidgen --get command's output). Only type the text within the quotation marks. -6. Write and quit: -`:wq!` - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Working with Text Files and Streams + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +March, 2022 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + + +## Modify a Text File Using sed: +> Someone got confused and wrote about cows instead of ants in a text file. We've got to replace all instances of cows and with Ants, regardless of whether or not cows contains any capital letters. +## _See File Content_: +1. Let's look at the file we're dealing with:
+`cat fable.txt` + +## _The Fix_: +1. Replace information +> We're going to run a sed command. The -i means "do this in place," as in don't create another file. The capital I near the end stands for "case-insensitive" and means that whether cows has any capital letters in it or not, change it to Ants. The g means do it globally, throughout the whole file.
+ +`sed -i 's/cows/Ants/Ig' fable.txt` + +> Now if we run our cat command again, we'll see that all the cows are gone. + +## Working with Basic Regular Expressions: +Understand how to read some text files and redirecting some output (output that we'll decide on using regular expressions) to other text files. + +## _Locate HTTP Services_: +1. Read information: +> We want to read all of the lines in /etc/services that start with http (but not any that start with httpx) and send them to ~/http-services.txt
+`grep ^http[^x] /etc/services > ~/http-services.txt` +2. To check if we have what we want in the new file, run:
+`cat ~/http-services.txt` + +## _Locate a Specific Services_: +1. Search lines:
+> This one is a little trickier. We want to find all of the lines in /etc/services that start with ldap. The fifth character can be any alphanumeric character, but the sixth character can not be an a. We'll dump the output into ~/lpic1-ldap.txt
+`grep ^ldap.[^a] /etc/services > ~/lpic1-ldap.txt` +2. To check if we have what we want in the new file, run:
+`cat ~/lpic1-ldap.txt` + +## _Refine the HTTP Results_: +1. Search lines:
+> We want to read the ~/http-services.txt file that we created earlier, and just look at lines that don't end with the word service. This grep command will do it:
+`grep -v service$ ~/http-services.txt > ~/http-updated.txt` +2. To check if we have what we want in the new file, run:
+`cat ~/http-updated.txt` + +## Creating and Modifying a File with Vim: +Understand how to create a text file with Vim, and edit it. + +## _Create a New File_: +1.We're going to create a new file called notes.txt in /home/cloud_user:
+``` +cd +vim notes.txt +``` +> Now, to add the text Beginning of Notes File, we need to get into insert mode, by pressing i. We can start typing now once we're in insert mode. +2. Leave two blank lines after Beginning of Notes File. Now, to save the file and quit Vim, we have to first hit Esc (to get out of insert mode), type :wq! (write and quit). + +## _Send Data to notes.txt_: +1. Appends content:
+> Using the cat command and output redirection, send the contents of the /etc/redhat-release file to the end of the notes.txt file, taking care to append the contents so as to not overwrite the file (using >>, not >) +> Run this to append notes.txt with the contents of /etc/redhat-release:
+`cat /etc/redhat-release >> notes.txt` + +## _Modify notes.txt_: +> Let's open notes.txt again for editing. We'll place the cursor before the opening parenthesis around the word Core and use a keyboard shortcut to delete the text from there to the end of the line. We'll leave two more blank lines at the end of the file and then save and quit again. +> Here are all of the steps to do that: +1. Open the file:
+`vim notes.txt` +2. Use the arrow keys to move to the beginning parentheses before Core
+3. Remove text from the cursor's position to end of line:
+`SHIFT D (or d$)` +4. Create a blank line under where the cursor is:
+`o +5. Hit Enter to create the second blank line +6. Hit Esc to leave insert mode +7. Hitting o added a blank line, but also put us in insert mode +8. Write and quit:
+`:wq!` + +## _Send More Data to the File, and Modify Its Contents_: +> Now we're going to send free -m output to the end of notes.txt, edit notes.txt again, delete the last line of the file, and add two more blank lines to the end of the file. +> Then, we're going to jump to the third line of the file, enter some text, and make another blank line afterward. +> Here are all of the steps to do that: +1. Append the notes.txt:
+`free -m >> notes.txt` +2. Edit notes.txt:
+`vim notes.txt` +3. Navigate to the Swap line with arrow keys. +4. Delete the line:
+`dd` +5. Create a blank line under where the cursor is (and put us in insert mode):
+`o` +6. Hit Enter to create the second blank line. +7. Hit Esc to get out of insert mode. +8. Get to the 3rd line of file:
+`:3` +9. Get back into insert mode:
+`i` +10. Type This is a practice system. +11. Hit Enter to make another blank line. +12. Hit Esc to leave insert mode. +13. Write and quit:
+`:wq!` + +## Finalize the Notes File: +> We're going to dump one last bit of text into the file, then edit it again. We'll take the output from dbus-uuidgen --get, append it to notes.txt then edit notes.txt so that the text Dbus ID = is in the beginning of the new appended line. +> We'll do it like this: +1. Append the notes.txt:
+`dbus-uuidgen --get >> notes.txt` +2. Edit notes.txt:
+`vim notes.txt` +3. Get right to the end of the file:
+`G (Capital G)` +4. Get into insert mode:
+`i` +5. Type "Dbus ID = " (with a space between the equals sign and the dbus-uuidgen --get command's output). Only type the text within the quotation marks. +6. Write and quit: +`:wq!` + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ + +Last updated: 2025-07-11 diff --git a/Cloud/0-linux/lab6/README.md b/Cloud/0-linux/lab6/README.md index 6ea2abc6..3a309acd 100644 --- a/Cloud/0-linux/lab6/README.md +++ b/Cloud/0-linux/lab6/README.md @@ -1,239 +1,239 @@ -# Linux Device Management - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - - -## Adding a New Hard Disk to a Linux System: -Understand how to create a new filesystem, mounting the filesystem to a directory, and then configuring the system so the mount persists across reboots. - -## _Create a New Partition_: -> Before we go mounting any new partition up, we've got to create that partition. -1. Open up a terminal window and log in using the credentials provided on the lab page, replacing x.x.x.x with the public IP address listed:
-`ssh cloud_user@x.x.x.x` -> Enter the provided password when prompted. -2. Next, let's run the lsblk command to verify we have a /dev/nvme1n1 device available. Once we've confirmed that, we'll create a partition on the /dev/nvme1n1 disk using fdisk. Note that we'll need to preface these commands with sudo for these commands. This partition we create will span the entire disk:
-``` -[cloud_user@host]$ lsblk -[cloud_user@host]$ sudo fdisk /dev/nvme1n1 -``` -3. After running fdisk, we'll have to perform a few tasks. At the Command (m for help): command, type n to make a new partition, then hit Enter. Our Partition type will be p, primary. -4. Press Enter for Partition number, the First sector, and the Last sector options. This will make fdisk ready to create the partition. Type p at the Command (m for help): to print out what the disk will look like after we commit our changes. -5. If that all looks good, type w and press Enter to write our changes to disk. - -## _Create the Filesystem_: -1. Next, we've got to create a filesystem, so we can read and write data. We'll format the partition to the XFS file system with the mkfs.xfs command. Once that is complete, we'll run blkid on the newly created partition to obtain the UUID. We'll have to make a note of this UUID, since we're going to need it later:
-``` -[cloud_user@host]$ sudo mkfs.xfs /dev/nvme1n1p1 -[cloud_user@host]$ sudo blkid /dev/nvme1n1p1 -``` - -## _Mount the New Filesystem and Make It Permanent_: -1. We can mount this partition up manually with the mount command, but it won't be a persistent mount; it won't get mounted after something like a reboot.We're going to edit /etc/fstab and create a new entry for the new disk at the bottom:
-`sudo vi /etc/fstab` -2. When you want to add text: hit the esc key and then i to go into insert mode type as normal. -3. When you want to save: hit the esc key and then :wq! -4. You may find the following vim cheat sheet helpful as well: https://linuxacademy.com/site-content/uploads/2019/05/vim-1.png -5. The format should follow the following (be sure to use your disk's UUID from the previous step):
-`UUID=YOURUUID /opt xfs defaults 0 0` -6. We can save the file (:wq!), Then run:
-`[cloud_user@host]$ sudo mount -a` -7. This will mount everything that's listed in fstab, including our new partition. -8. And running a quick df -h /opt should show us roughly 5GB available for the /opt directory. - -## Working with the CUPS Print Server: -Understand how to work with print server that will send jobs to PDF files. We will use the lpd (line print daemon) toolset provided by a CUPS installation. - -## _Install a PDF Printer_: -1. Open your terminal application. -2. Check to see which printers are installed:
-`lpstat -s` -3. Check to see what types of printer connections are available:
-`sudo lpinfo -v` -4. Install a PDF printer to use with CUPS:
-`sudo lpadmin -p CUPS-PDF -v cups-pdf:/` -5. Determine which driver files we can use with our printer by querying the CUPS database for files that contain "PDF":
-`lpinfo --make-and-model "PDF" -m` -6. Use CUPS-PDF.ppd as the driver file:
-`sudo lpadmin -p CUPS-PDF -m "CUPS-PDF.ppd"` -7. Run the lpstat command again:
-`lpstat -s` -8. Check the status of the printer we just installed:
-`lpc status` -9. Enable the printer to accept jobs, and set it up as the default printer: -``` -sudo lpadmin -d CUPS-PDF -E -sudo cupsenable CUPS-PDF -sudo cupsaccept CUPS-PDF -``` -10. Run the lpc status command again: -`lpc status` -> The printer should now be ready. - -## _Print a Test Page_: -1. Print a copy of the /etc/passwd file to a PDF file in our home directory:
-`lpr /etc/passwd` -2. Verify that there is a copy of the /etc/passwd file in the home directory:
-`ls` - -## _Modify the Printer and Work with the Print Queue_: -1. Configure the printer so that it will not accept any new jobs:
-`sudo cupsreject CUPS-PDF` -2. Verify the status of the printer:
-`lpc status` -3. Attempt to print the /etc/group file to the printer:
-`lpr /etc/group` -4. You should receive a message that says the printer is not currently accepting jobs. -5. Reconfigure the printer to once again accept incoming jobs: -`sudo cupsaccept CUPS-PDF` -6. Check the status of the printer: -`lpc status` -7. Configure the printer so that it accepts jobs to its queue but will not print them: -`sudo cupsdisable CUPS-PDF` -8. Check the status of the printer: -`lpc status` -9. Attempt to print the /etc/group file again: -`lpr /etc/group` -10. List the contents of the /home directory: -`ls` -11. Check the printer's queue: -`lpq` -12. Remove the job from the printer's queue (remember to substitute the job ID from your command's output): -`lprm ` -13. Verify that the job was successfully removed from the printer's queue: -`lpq` -14. Re-enable the printer's ability to print new jobs: -`sudo cupsenable CUPS-PDF` -15. Verify that the CUPS-PDF printer is once again ready to accept new jobs: -`lpq` - -## Storage Management: -Understanding of how to use these tools is a fundamental component of a Linux sysadmin career. - -> Then, become root:
-`sudo -i` - -## _Create a 2 GB GPT Partition on /dev/nvme1n1_: -1. Create the partition:
-`gdisk /dev/nvme1n1` -2. Enter n to create a new partition. -3. Accept the default for the partition number. -4. Accept the default for the starting sector. -5. For the ending sector, enter +2G to create a 2 GB partition. -6. Accept the default partition type. -7. Enter w to write the partition information. -8. Enter y to proceed. -9. Finalize the settings:
-`partprobe` - -## _Create a 2 GB MBR Partition on /dev/nvme2n1_: -1. Create the partition:
-`fdisk /dev/nvme2n1` -2. Enter n to create a new partition. -3. Accept the default partition type. -4. Accept the default for the partition number. -5. Accept the default for the starting sector. -6. For the ending sector, type +2G to create a 2 GB partition. -7. Enter w to write the partition information. -8. Finalize the settings:
-`partprobe` - -## _Format the GPT Partition with XFS and Mount the Device on /mnt/gptxfs Persistently_: -1. Format the partition:
-`mkfs.xfs /dev/nvme1n1p1` -> Getting It Ready for Mounting -2. Run the following:
-`blkid` -3. Copy the UUID of the partition at /dev/nvme1n1p1. -4. Open the /etc/fstab file:
-`vim /etc/fstab` -5. Add the following, replacing with the UUID you just copied:
-`UUID="" /mnt/gptxfs xfs defaults 0 0` -6. Save and exit the file by pressing Escape followed by :wq. - -> Create a Mount Point -1. Create the mount point we specified in fstab:
-`mkdir /mnt/gptxfs` -2. Mount everything that's described in fstab:
-`mount -a` -3. Check that it's mounted:
-`mount` -> The partition should be listed in the output. - -## _Format the MBR Partition with ext4 and Mount the Device on /mnt/mbrext4_: -1. Format the partition:
-`mkfs.ext4 /dev/nvme2n1p1` -2. Create the mount point:
-`mkdir /mnt/mbrext4` -3. Mount it:
-`mount /dev/nvme2n1p1 /mnt/mbrext4` -4. Check that it's mounted:
-`mount` -> The partition should be listed in the output. - -## _Working with LVM Storage_: -Understanding of how to use LVM managent tool - ->> *Scenario* - -> We've been tasked with creating a large logical volume out of the two disks attached to this server. The volume group name should be RHCSA. The Logical Volume name should be pinehead and should be 3 GB in size. -> Make sure that the resulting logical volume is formatted as XFS, and persistently mounted at /mnt/lvol. -> After that is complete, we should grow the logical volume and the filesystem by 200 MB. - -## _Create a Physical Device_: -1. To see the names of our disks, we need to run fdisk -l. -2. Then we run pvcreate /dev/xvdg /dev/xvdf to create the physical devices. -3. To check how it went, we can do a quick pvs or pvdisplay, and we'll see that they've been created. - -## _Create a Volume Group_: -1. All we need to do is run vgcreate RHCSA /dev/xvdg /dev/xvdf. -> RHCSA is going to be the name of our volume group, and those physical devices we created in the last step is where this volume group will go. - -## _Create a Logical Volume_: -1. Now we can create the our logical volume using the lvcreate command:
-`[root@host]# lvcreate -n pinehead -L 3G RHCSA` -> -n denotes the name of the LV
-> -L denotes the size of the LV
-> RHCSA is the name of the Volume Group we're creating this LV in - -## _Format the LV as XFS and Mount It Persistently at /mnt/lvol_: -1. Now we can format the disk like any other device. To format it as XFS, we'll run:
-`[root@host]# mkfs.xfs /dev/mapper/RHCSA-pinehead` -2. We've got to create a mount point:
-`mkdir /mnt/lvol` -3. Before we can get it mounting persistently (after reboots), we need the UUID. Run blkid to get it, then copy it. We'll need it in a second. -4. Edit /etc/fstab (with whichever text editor you prefer) and create a new line that looks like this: -`UUID="<THE_UUID_WE_COPIED>" /mnt/lvol xfs defaults 0 0` -5. Now, to mount everything listed in fstab (including this new mount we just created), let's run mount -a. - -## _Grow the Mount Point by 200 MB_: -1. To grow an LV, we can run:
-`[root@host]# lvextend -L+200M /dev/RHCSA/pinehead` -2. We can let the LVM tools automatically resize the filesystem as well by passing the -r or --resizefs flags. -3. Optionally, we could have run a growfs command to resize the filesystem:
-`[root@host]# xfs_growfs /mnt/lvol` - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Linux Device Management + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + + +## Adding a New Hard Disk to a Linux System: +Understand how to create a new filesystem, mounting the filesystem to a directory, and then configuring the system so the mount persists across reboots. + +## _Create a New Partition_: +> Before we go mounting any new partition up, we've got to create that partition. +1. Open up a terminal window and log in using the credentials provided on the lab page, replacing x.x.x.x with the public IP address listed:
+`ssh cloud_user@x.x.x.x` +> Enter the provided password when prompted. +2. Next, let's run the lsblk command to verify we have a /dev/nvme1n1 device available. Once we've confirmed that, we'll create a partition on the /dev/nvme1n1 disk using fdisk. Note that we'll need to preface these commands with sudo for these commands. This partition we create will span the entire disk:
+``` +[cloud_user@host]$ lsblk +[cloud_user@host]$ sudo fdisk /dev/nvme1n1 +``` +3. After running fdisk, we'll have to perform a few tasks. At the Command (m for help): command, type n to make a new partition, then hit Enter. Our Partition type will be p, primary. +4. Press Enter for Partition number, the First sector, and the Last sector options. This will make fdisk ready to create the partition. Type p at the Command (m for help): to print out what the disk will look like after we commit our changes. +5. If that all looks good, type w and press Enter to write our changes to disk. + +## _Create the Filesystem_: +1. Next, we've got to create a filesystem, so we can read and write data. We'll format the partition to the XFS file system with the mkfs.xfs command. Once that is complete, we'll run blkid on the newly created partition to obtain the UUID. We'll have to make a note of this UUID, since we're going to need it later:
+``` +[cloud_user@host]$ sudo mkfs.xfs /dev/nvme1n1p1 +[cloud_user@host]$ sudo blkid /dev/nvme1n1p1 +``` + +## _Mount the New Filesystem and Make It Permanent_: +1. We can mount this partition up manually with the mount command, but it won't be a persistent mount; it won't get mounted after something like a reboot.We're going to edit /etc/fstab and create a new entry for the new disk at the bottom:
+`sudo vi /etc/fstab` +2. When you want to add text: hit the esc key and then i to go into insert mode type as normal. +3. When you want to save: hit the esc key and then :wq! +4. You may find the following vim cheat sheet helpful as well: https://linuxacademy.com/site-content/uploads/2019/05/vim-1.png +5. The format should follow the following (be sure to use your disk's UUID from the previous step):
+`UUID=YOURUUID /opt xfs defaults 0 0` +6. We can save the file (:wq!), Then run:
+`[cloud_user@host]$ sudo mount -a` +7. This will mount everything that's listed in fstab, including our new partition. +8. And running a quick df -h /opt should show us roughly 5GB available for the /opt directory. + +## Working with the CUPS Print Server: +Understand how to work with print server that will send jobs to PDF files. We will use the lpd (line print daemon) toolset provided by a CUPS installation. + +## _Install a PDF Printer_: +1. Open your terminal application. +2. Check to see which printers are installed:
+`lpstat -s` +3. Check to see what types of printer connections are available:
+`sudo lpinfo -v` +4. Install a PDF printer to use with CUPS:
+`sudo lpadmin -p CUPS-PDF -v cups-pdf:/` +5. Determine which driver files we can use with our printer by querying the CUPS database for files that contain "PDF":
+`lpinfo --make-and-model "PDF" -m` +6. Use CUPS-PDF.ppd as the driver file:
+`sudo lpadmin -p CUPS-PDF -m "CUPS-PDF.ppd"` +7. Run the lpstat command again:
+`lpstat -s` +8. Check the status of the printer we just installed:
+`lpc status` +9. Enable the printer to accept jobs, and set it up as the default printer: +``` +sudo lpadmin -d CUPS-PDF -E +sudo cupsenable CUPS-PDF +sudo cupsaccept CUPS-PDF +``` +10. Run the lpc status command again: +`lpc status` +> The printer should now be ready. + +## _Print a Test Page_: +1. Print a copy of the /etc/passwd file to a PDF file in our home directory:
+`lpr /etc/passwd` +2. Verify that there is a copy of the /etc/passwd file in the home directory:
+`ls` + +## _Modify the Printer and Work with the Print Queue_: +1. Configure the printer so that it will not accept any new jobs:
+`sudo cupsreject CUPS-PDF` +2. Verify the status of the printer:
+`lpc status` +3. Attempt to print the /etc/group file to the printer:
+`lpr /etc/group` +4. You should receive a message that says the printer is not currently accepting jobs. +5. Reconfigure the printer to once again accept incoming jobs: +`sudo cupsaccept CUPS-PDF` +6. Check the status of the printer: +`lpc status` +7. Configure the printer so that it accepts jobs to its queue but will not print them: +`sudo cupsdisable CUPS-PDF` +8. Check the status of the printer: +`lpc status` +9. Attempt to print the /etc/group file again: +`lpr /etc/group` +10. List the contents of the /home directory: +`ls` +11. Check the printer's queue: +`lpq` +12. Remove the job from the printer's queue (remember to substitute the job ID from your command's output): +`lprm ` +13. Verify that the job was successfully removed from the printer's queue: +`lpq` +14. Re-enable the printer's ability to print new jobs: +`sudo cupsenable CUPS-PDF` +15. Verify that the CUPS-PDF printer is once again ready to accept new jobs: +`lpq` + +## Storage Management: +Understanding of how to use these tools is a fundamental component of a Linux sysadmin career. + +> Then, become root:
+`sudo -i` + +## _Create a 2 GB GPT Partition on /dev/nvme1n1_: +1. Create the partition:
+`gdisk /dev/nvme1n1` +2. Enter n to create a new partition. +3. Accept the default for the partition number. +4. Accept the default for the starting sector. +5. For the ending sector, enter +2G to create a 2 GB partition. +6. Accept the default partition type. +7. Enter w to write the partition information. +8. Enter y to proceed. +9. Finalize the settings:
+`partprobe` + +## _Create a 2 GB MBR Partition on /dev/nvme2n1_: +1. Create the partition:
+`fdisk /dev/nvme2n1` +2. Enter n to create a new partition. +3. Accept the default partition type. +4. Accept the default for the partition number. +5. Accept the default for the starting sector. +6. For the ending sector, type +2G to create a 2 GB partition. +7. Enter w to write the partition information. +8. Finalize the settings:
+`partprobe` + +## _Format the GPT Partition with XFS and Mount the Device on /mnt/gptxfs Persistently_: +1. Format the partition:
+`mkfs.xfs /dev/nvme1n1p1` +> Getting It Ready for Mounting +2. Run the following:
+`blkid` +3. Copy the UUID of the partition at /dev/nvme1n1p1. +4. Open the /etc/fstab file:
+`vim /etc/fstab` +5. Add the following, replacing with the UUID you just copied:
+`UUID="" /mnt/gptxfs xfs defaults 0 0` +6. Save and exit the file by pressing Escape followed by :wq. + +> Create a Mount Point +1. Create the mount point we specified in fstab:
+`mkdir /mnt/gptxfs` +2. Mount everything that's described in fstab:
+`mount -a` +3. Check that it's mounted:
+`mount` +> The partition should be listed in the output. + +## _Format the MBR Partition with ext4 and Mount the Device on /mnt/mbrext4_: +1. Format the partition:
+`mkfs.ext4 /dev/nvme2n1p1` +2. Create the mount point:
+`mkdir /mnt/mbrext4` +3. Mount it:
+`mount /dev/nvme2n1p1 /mnt/mbrext4` +4. Check that it's mounted:
+`mount` +> The partition should be listed in the output. + +## _Working with LVM Storage_: +Understanding of how to use LVM managent tool + +>> *Scenario* + +> We've been tasked with creating a large logical volume out of the two disks attached to this server. The volume group name should be RHCSA. The Logical Volume name should be pinehead and should be 3 GB in size. +> Make sure that the resulting logical volume is formatted as XFS, and persistently mounted at /mnt/lvol. +> After that is complete, we should grow the logical volume and the filesystem by 200 MB. + +## _Create a Physical Device_: +1. To see the names of our disks, we need to run fdisk -l. +2. Then we run pvcreate /dev/xvdg /dev/xvdf to create the physical devices. +3. To check how it went, we can do a quick pvs or pvdisplay, and we'll see that they've been created. + +## _Create a Volume Group_: +1. All we need to do is run vgcreate RHCSA /dev/xvdg /dev/xvdf. +> RHCSA is going to be the name of our volume group, and those physical devices we created in the last step is where this volume group will go. + +## _Create a Logical Volume_: +1. Now we can create the our logical volume using the lvcreate command:
+`[root@host]# lvcreate -n pinehead -L 3G RHCSA` +> -n denotes the name of the LV
+> -L denotes the size of the LV
+> RHCSA is the name of the Volume Group we're creating this LV in + +## _Format the LV as XFS and Mount It Persistently at /mnt/lvol_: +1. Now we can format the disk like any other device. To format it as XFS, we'll run:
+`[root@host]# mkfs.xfs /dev/mapper/RHCSA-pinehead` +2. We've got to create a mount point:
+`mkdir /mnt/lvol` +3. Before we can get it mounting persistently (after reboots), we need the UUID. Run blkid to get it, then copy it. We'll need it in a second. +4. Edit /etc/fstab (with whichever text editor you prefer) and create a new line that looks like this: +`UUID="<THE_UUID_WE_COPIED>" /mnt/lvol xfs defaults 0 0` +5. Now, to mount everything listed in fstab (including this new mount we just created), let's run mount -a. + +## _Grow the Mount Point by 200 MB_: +1. To grow an LV, we can run:
+`[root@host]# lvextend -L+200M /dev/RHCSA/pinehead` +2. We can let the LVM tools automatically resize the filesystem as well by passing the -r or --resizefs flags. +3. Optionally, we could have run a growfs command to resize the filesystem:
+`[root@host]# xfs_growfs /mnt/lvol` + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab7/README.md b/Cloud/0-linux/lab7/README.md index d85253c5..cc313715 100644 --- a/Cloud/0-linux/lab7/README.md +++ b/Cloud/0-linux/lab7/README.md @@ -1,71 +1,71 @@ -# The Linux Shell - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## Modifying the Bash Shell -Understand how to create our own alias for a command and then create a new command that will take a positional argument. - ->> Scenario - -> You have just started a new job managing a web server for a small company. To make your job a bit easier, you have decided to create some shorthand commands that will help you in your daily tasks.
-> *. First, you will create an alias to view the status of the HTTP service that is running on the company's small web server.
-> *. Next, you will create a function that allows you to monitor the disk usage of a couple of web content directories. - -## _Create the alias_: -1. The first step is to create an alias for the Bash shell that will allow you to view the service status of the web server itself. You will name this alias webstat. When you type the command webstat at the prompt, you will see the output of the command systemctl status httpd.service. User-created aliases and functions should go in your local ~/.bashrc file. Using the commands listed, append the following alias to your ~/.bashrc file:
-`echo 'alias webstat="systemctl status httpd.service"' >> /home/cloud_user/.bashrc` - -## _Load and test the alias_: -1. Now that we have created an alias that displays the status of the web server, we need to tell Bash that we want to use it in our current session. First, we need to source our .bashrc file using the “dot” (.) command:
-`. ~/.bashrc` -2. Now that the Bash environment has been refreshed with the new alias from our ~/.bashrc file, we can use our new alias:
-`webstat` -> We should be able to see the output of our service's status command. - -## _Create your function_: -1. The next step is to create a function that will take the name of a directory as a parameter and print out how much disk space that directory is using. Using the vi text editor, open up the ~/.bashrc file and add the following function to the bottom, beneath the alias that you created earlier:
-`vim ~/.bashrc` -``` -function webspace() -{ - du -h /var/www/html/$1; -} -``` -2. Save and close your file. -3. Then source the .bashrc file again:
-`. .bashrc` - -## _Use the webspace function_: -1. Since the /var/www/html directory is the root location for all of the individual site locations for this web server, all you need to do is provide the name of the folder that contains a particular part of the site to the webspace function. To view the size and contents of the main public web page, enter this command:
-`webspace main` -> This will print out the contents of the /var/www/html/main directory and how much disk space this directory uses. The $1 used in your function is a positional argument. When you type webspace main at the prompt, the word main is replaced by the $1 argument, thus providing the output of the command for the /var/www/html/main directory. -2. Try the same command again, this time for the customer directory on the web server:
-`webspace customer` -> You should see more directories in the output, plus a 5 MB client binary file. - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# The Linux Shell + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## Modifying the Bash Shell +Understand how to create our own alias for a command and then create a new command that will take a positional argument. + +>> Scenario + +> You have just started a new job managing a web server for a small company. To make your job a bit easier, you have decided to create some shorthand commands that will help you in your daily tasks.
+> *. First, you will create an alias to view the status of the HTTP service that is running on the company's small web server.
+> *. Next, you will create a function that allows you to monitor the disk usage of a couple of web content directories. + +## _Create the alias_: +1. The first step is to create an alias for the Bash shell that will allow you to view the service status of the web server itself. You will name this alias webstat. When you type the command webstat at the prompt, you will see the output of the command systemctl status httpd.service. User-created aliases and functions should go in your local ~/.bashrc file. Using the commands listed, append the following alias to your ~/.bashrc file:
+`echo 'alias webstat="systemctl status httpd.service"' >> /home/cloud_user/.bashrc` + +## _Load and test the alias_: +1. Now that we have created an alias that displays the status of the web server, we need to tell Bash that we want to use it in our current session. First, we need to source our .bashrc file using the “dot” (.) command:
+`. ~/.bashrc` +2. Now that the Bash environment has been refreshed with the new alias from our ~/.bashrc file, we can use our new alias:
+`webstat` +> We should be able to see the output of our service's status command. + +## _Create your function_: +1. The next step is to create a function that will take the name of a directory as a parameter and print out how much disk space that directory is using. Using the vi text editor, open up the ~/.bashrc file and add the following function to the bottom, beneath the alias that you created earlier:
+`vim ~/.bashrc` +``` +function webspace() +{ + du -h /var/www/html/$1; +} +``` +2. Save and close your file. +3. Then source the .bashrc file again:
+`. .bashrc` + +## _Use the webspace function_: +1. Since the /var/www/html directory is the root location for all of the individual site locations for this web server, all you need to do is provide the name of the folder that contains a particular part of the site to the webspace function. To view the size and contents of the main public web page, enter this command:
+`webspace main` +> This will print out the contents of the /var/www/html/main directory and how much disk space this directory uses. The $1 used in your function is a positional argument. When you type webspace main at the prompt, the word main is replaced by the $1 argument, thus providing the output of the command for the /var/www/html/main directory. +2. Try the same command again, this time for the customer directory on the web server:
+`webspace customer` +> You should see more directories in the output, plus a 5 MB client binary file. + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ s \ No newline at end of file diff --git a/Cloud/0-linux/lab8/README.md b/Cloud/0-linux/lab8/README.md index 08f090e2..54382105 100644 --- a/Cloud/0-linux/lab8/README.md +++ b/Cloud/0-linux/lab8/README.md @@ -1,230 +1,230 @@ -# Networking - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - - -## Testing DNS Resolution -Understand how to utilize the nmcli utility to configure our DNS resolution. - -## _Review Current DNS Configuration_: -1. See if the system can resolve hostnames to IP addresses:
-`host www.google.com` -> Note that the command times out. -2. Check to see what DNS server entries we have in the /etc/resolv.conf file:
-`cat /etc/resolv.conf` -> Note that we do not have any DNS entries listed. -3. Review our network connections:
-`nmcli con show` -> Our default connection name should be System ens5. -4. Review our DNS IP settings: -`nmcli -f ipv4.dns con show "System ens5"` -> This system obviously does not have any DNS servers configured for use. - -## _Configure Your System to Use Your Network's DNS_: -1. Modify the system's default connection to use the network's DNS server
-`sudo nmcli con mod "System ens5" ipv4.dns "10.0.0.2"` -2. Verify the settings using the nmcli command and then checking the /etc/resolv.conf file:
-``` -nmcli -f ipv4.dns con show "System ens5" -cat /etc/resolv.conf -``` -3. We need to reactivate the system's network connection for the change to take effect:
-`sudo nmcli con up "System ens5"` -4. Verify our settings once more:
-`cat /etc/resolv.conf` -5. Now, attempt to resolve a hostname to an IP address:
-`host www.google.com` -> Our system should be able to resolve an IP address for the domain name. - -## Monitoring Network Access: -Understand how use the netcat (nc) utility to generate network traffic between two servers and view that traffic's appearance in a tool called iptraf-ng. - ->> *The Scenario* - -> During the development of a new Web-based API our team is working on, they have discovered that they are receiving intermittent network disconnects from clients, even when they are local to the network of the server itself. -> We have been provided credentials and access information for two CentOS 7 systems in their environment. They have asked for us to install tools that they can use to monitor network traffic between the two systems. We'll have to install the tools we need and create traffic on port 2525 from server2 to server1. We want to get all network traffic sent to /home/cloud_user/traffic_log.txt. - -## _Install Client Utilities_: -1. We've got to install the two packages that the team will use to generate and monitor traffic. Let's use YUM to get it done:
-`[root@server1]# yum install iptraf-ng nc` -2. Repeat this on the other server:
-`[root@server2]# yum install iptraf-ng nc` - -## _Create the Traffic Log File_: -1. On the first server, let's run iptraf-ng. -2. Go under Configure... -> In the menu, don't forget this isn't a menu we control with a mouse -- it's all keyboard. -3. Make sure Logging is toggled to On. Set the log file path to: /home/cloud_user/traffic_log.txt. -4. Then go into IP traffic monitor. -5. In the next menu, select eth0. -6. Once we press Enter the logging will start. - -## _Listen for Traffic_: -1. Let's open a second terminal into server1 and run sudo su right off. -2. Once we're there, we're going to start netcat listening on post 2525 with this:
-`[root@server1]# nc -l 2525` - -## _Send Some Traffic_: -1. Now, let's start talking. Back in the server2 window we've got open, send netcat traffic to server1 with this (where x.x.x.x is the internal IP of server1 that we'll see on the hands-on lab overview page):
-`[root@server2]# nc x.x.x.x 2525` -2. We'll just land at a blinking cursor below the prompt, but we can type a message there and press Enter. Once we do, it will show up back in the window we're listening in on server1. A bunch of messages sent from server2 would look like this:
-`[root@server2]# nc x.x.x.x 2525` -``` -test -test -testing -This is a test -```` -3. On server1, they would look like this when they arrive:
-`[root@server1]# nc -l 2525` -``` -test -test -testing -This is a test -``` -4. That should be enough traffic for what we're doing. -5. On server2, press Ctrl + C to kill the nc command we've got running and flip back over to the terminal we were running iptraf-ng in. -6. Press x to stop the monitoring and get out, then choose Exit from the main menu. - -## _Examine the Log_: -1. On server1, if we run ls /home/cloud_user we should see traffic_log.txt listed in the output. -2. Read that to see if it was capturing what we need: -`[root@server1]# less /home/cloud_user/traffic_log.txt` -> We should see some log entries showing traffic going from server2 to server1 on port 2525. - - -## Network Filesystems: -Understand how to configure network filesystems, how to set up both a Linux Samba fileshare and an NFS fileshare that can then be used by a remote client to store files. - -## _Set Up the Samba Server_: -1. Become root:
-`[cloud_user@samba-server]$ sudo -i` -2. Create the /smb path:
-`[root@samba-server]# mkdir /smb` -3. Make sure the client can write to the path:
-`[root@samba-server]# chmod 777 /smb` -4. Install the Samba packages:
-`[root@samba-server]# yum install samba -y` -5. Open /etc/samba/smb.conf:
-`[root@samba-server]# vim /etc/samba/smb.conf` -6. Add the following section at the bottom:
-``` -[share] - browsable = yes - path = /smb - writable = yes -``` -7. Save and exit the file by pressing Escape followed by :wq. -8. Check that our changes saved correctly: -`[root@samba-server]# testparm` - -## _Samba Share User_: -1. Create the user on the server:
-`[root@samba-server]# useradd shareuser` -2. Give it a password:
-`[root@samba-server]# smbpasswd -a shareuser` -> Enter and confirm a password you'll easily remember (e.g., 123456), as we'll need to reenter it later. - -## _Start It Up_: -1. Start the Samba daemon:
-`[root@samba-server]# systemctl start smb` - -## _Set Up the Samba Client_: -1. Open up a new terminal. -2. Log in to the NFS server -3. Become root:
-`[cloud_user@nfs-server]$ sudo -i` -4. Install software:
-`[root@nfs-server]# yum install cifs-utils -y` - -## _Make a Mount Point_: -Create a place for mounting the share: -`[root@nfs-server]# mkdir /mnt/smb` - -## _The Mount_: -1. In the Samba server terminal, get its IP address:
-`[root@samba-server]# ip a s` -2. Copy the private inet address on eth0, and paste it into a text file, as we'll need it next. -3. In the NFS terminal, run the following command, replacing with the IP you just copied and with the password you created earlier: -`[root@nfs-server]# mount -t cifs ///share /mnt/smb -o username=shareuser,password=` -4. Make sure you see it listed when you run:
-`[root@nfs-server]# mount` -5. Change directory:
-`[root@nfs-server]# cd /mnt/smb` -6. Create a file:
-`[root@nfs-server smb]# touch file` -7. List the contents:
-`[root@nfs-server smb]# ls` -> We should see the new file called file. - -## _Set Up the NFS Share_: -1. Install software:
-`[root@nfs-server smb]# yum install nfs-utils -y` -2. Create the directory that will be shared out:
-`[root@nfs-server smb]# mkdir /nfs` -3. Open /etc/exports:
-`[root@nfs-server smb]# vim /etc/exports` -4. Add the following line:
-`/nfs *(rw)` -5. Save and exit the file by pressing Escape followed by :wq.
-6. Edit permissions, to make sure it's going to be writable, on the shared directory:
-`[root@nfs-server smb]# chmod 777 /nfs` -7. Implement what we've configured in /etc/exports:
-`[root@nfs-server smb]# exportfs -a` -8. Start the required services:
-`[root@nfs-server smb]# systemctl start {rpcbind,nfs-server,rpc-statd,nfs-idmapd}` -9. Verify it:
-`[root@nfs-server smb]# showmount -e localhost` -10. Run the following to get the NFS server's IP:
-`[root@nfs-server smb]# ip a s` -11. Copy the inet address on eth0 and paste it into a text file, as we'll need it shortly. - -## _Set Up the NFS Client_: -1. In the Samba server terminal, install software:
-`[root@samba-server]# yum install nfs-utils -y` -2. Create a mount point:
-`[root@samba-server]# mkdir /mnt/nfs` -3. Check to see what's being shared out on the NFS server, replacing with the IP you copied earlier:
-`[root@samba-server]# showmount -e ` -4. To be able to mount NFS shares, we need start a daemon:
-`[root@samba-server]# systemctl start rpcbind` - -## _Mount the NFS Share_: -1. Mount it, replacing with the IP you copied earlier:
-`[root@samba-server]# mount -t nfs :/nfs /mnt/nfs` -2. Make sure you see it listed after running:
-`[root@samba-server]# mount` -3. Change directory:
-`[root@samba-server]# cd /mnt/nfs` -4. Create a file:
-`[root@samba-server nfs]# touch file` -5. List the contents:
-`[root@samba-server nfs]# ls` -> We should see the new file, called file. - -## References - -https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Networking + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + + +## Testing DNS Resolution +Understand how to utilize the nmcli utility to configure our DNS resolution. + +## _Review Current DNS Configuration_: +1. See if the system can resolve hostnames to IP addresses:
+`host www.google.com` +> Note that the command times out. +2. Check to see what DNS server entries we have in the /etc/resolv.conf file:
+`cat /etc/resolv.conf` +> Note that we do not have any DNS entries listed. +3. Review our network connections:
+`nmcli con show` +> Our default connection name should be System ens5. +4. Review our DNS IP settings: +`nmcli -f ipv4.dns con show "System ens5"` +> This system obviously does not have any DNS servers configured for use. + +## _Configure Your System to Use Your Network's DNS_: +1. Modify the system's default connection to use the network's DNS server
+`sudo nmcli con mod "System ens5" ipv4.dns "10.0.0.2"` +2. Verify the settings using the nmcli command and then checking the /etc/resolv.conf file:
+``` +nmcli -f ipv4.dns con show "System ens5" +cat /etc/resolv.conf +``` +3. We need to reactivate the system's network connection for the change to take effect:
+`sudo nmcli con up "System ens5"` +4. Verify our settings once more:
+`cat /etc/resolv.conf` +5. Now, attempt to resolve a hostname to an IP address:
+`host www.google.com` +> Our system should be able to resolve an IP address for the domain name. + +## Monitoring Network Access: +Understand how use the netcat (nc) utility to generate network traffic between two servers and view that traffic's appearance in a tool called iptraf-ng. + +>> *The Scenario* + +> During the development of a new Web-based API our team is working on, they have discovered that they are receiving intermittent network disconnects from clients, even when they are local to the network of the server itself. +> We have been provided credentials and access information for two CentOS 7 systems in their environment. They have asked for us to install tools that they can use to monitor network traffic between the two systems. We'll have to install the tools we need and create traffic on port 2525 from server2 to server1. We want to get all network traffic sent to /home/cloud_user/traffic_log.txt. + +## _Install Client Utilities_: +1. We've got to install the two packages that the team will use to generate and monitor traffic. Let's use YUM to get it done:
+`[root@server1]# yum install iptraf-ng nc` +2. Repeat this on the other server:
+`[root@server2]# yum install iptraf-ng nc` + +## _Create the Traffic Log File_: +1. On the first server, let's run iptraf-ng. +2. Go under Configure... +> In the menu, don't forget this isn't a menu we control with a mouse -- it's all keyboard. +3. Make sure Logging is toggled to On. Set the log file path to: /home/cloud_user/traffic_log.txt. +4. Then go into IP traffic monitor. +5. In the next menu, select eth0. +6. Once we press Enter the logging will start. + +## _Listen for Traffic_: +1. Let's open a second terminal into server1 and run sudo su right off. +2. Once we're there, we're going to start netcat listening on post 2525 with this:
+`[root@server1]# nc -l 2525` + +## _Send Some Traffic_: +1. Now, let's start talking. Back in the server2 window we've got open, send netcat traffic to server1 with this (where x.x.x.x is the internal IP of server1 that we'll see on the hands-on lab overview page):
+`[root@server2]# nc x.x.x.x 2525` +2. We'll just land at a blinking cursor below the prompt, but we can type a message there and press Enter. Once we do, it will show up back in the window we're listening in on server1. A bunch of messages sent from server2 would look like this:
+`[root@server2]# nc x.x.x.x 2525` +``` +test +test +testing +This is a test +```` +3. On server1, they would look like this when they arrive:
+`[root@server1]# nc -l 2525` +``` +test +test +testing +This is a test +``` +4. That should be enough traffic for what we're doing. +5. On server2, press Ctrl + C to kill the nc command we've got running and flip back over to the terminal we were running iptraf-ng in. +6. Press x to stop the monitoring and get out, then choose Exit from the main menu. + +## _Examine the Log_: +1. On server1, if we run ls /home/cloud_user we should see traffic_log.txt listed in the output. +2. Read that to see if it was capturing what we need: +`[root@server1]# less /home/cloud_user/traffic_log.txt` +> We should see some log entries showing traffic going from server2 to server1 on port 2525. + + +## Network Filesystems: +Understand how to configure network filesystems, how to set up both a Linux Samba fileshare and an NFS fileshare that can then be used by a remote client to store files. + +## _Set Up the Samba Server_: +1. Become root:
+`[cloud_user@samba-server]$ sudo -i` +2. Create the /smb path:
+`[root@samba-server]# mkdir /smb` +3. Make sure the client can write to the path:
+`[root@samba-server]# chmod 777 /smb` +4. Install the Samba packages:
+`[root@samba-server]# yum install samba -y` +5. Open /etc/samba/smb.conf:
+`[root@samba-server]# vim /etc/samba/smb.conf` +6. Add the following section at the bottom:
+``` +[share] + browsable = yes + path = /smb + writable = yes +``` +7. Save and exit the file by pressing Escape followed by :wq. +8. Check that our changes saved correctly: +`[root@samba-server]# testparm` + +## _Samba Share User_: +1. Create the user on the server:
+`[root@samba-server]# useradd shareuser` +2. Give it a password:
+`[root@samba-server]# smbpasswd -a shareuser` +> Enter and confirm a password you'll easily remember (e.g., 123456), as we'll need to reenter it later. + +## _Start It Up_: +1. Start the Samba daemon:
+`[root@samba-server]# systemctl start smb` + +## _Set Up the Samba Client_: +1. Open up a new terminal. +2. Log in to the NFS server +3. Become root:
+`[cloud_user@nfs-server]$ sudo -i` +4. Install software:
+`[root@nfs-server]# yum install cifs-utils -y` + +## _Make a Mount Point_: +Create a place for mounting the share: +`[root@nfs-server]# mkdir /mnt/smb` + +## _The Mount_: +1. In the Samba server terminal, get its IP address:
+`[root@samba-server]# ip a s` +2. Copy the private inet address on eth0, and paste it into a text file, as we'll need it next. +3. In the NFS terminal, run the following command, replacing with the IP you just copied and with the password you created earlier: +`[root@nfs-server]# mount -t cifs ///share /mnt/smb -o username=shareuser,password=` +4. Make sure you see it listed when you run:
+`[root@nfs-server]# mount` +5. Change directory:
+`[root@nfs-server]# cd /mnt/smb` +6. Create a file:
+`[root@nfs-server smb]# touch file` +7. List the contents:
+`[root@nfs-server smb]# ls` +> We should see the new file called file. + +## _Set Up the NFS Share_: +1. Install software:
+`[root@nfs-server smb]# yum install nfs-utils -y` +2. Create the directory that will be shared out:
+`[root@nfs-server smb]# mkdir /nfs` +3. Open /etc/exports:
+`[root@nfs-server smb]# vim /etc/exports` +4. Add the following line:
+`/nfs *(rw)` +5. Save and exit the file by pressing Escape followed by :wq.
+6. Edit permissions, to make sure it's going to be writable, on the shared directory:
+`[root@nfs-server smb]# chmod 777 /nfs` +7. Implement what we've configured in /etc/exports:
+`[root@nfs-server smb]# exportfs -a` +8. Start the required services:
+`[root@nfs-server smb]# systemctl start {rpcbind,nfs-server,rpc-statd,nfs-idmapd}` +9. Verify it:
+`[root@nfs-server smb]# showmount -e localhost` +10. Run the following to get the NFS server's IP:
+`[root@nfs-server smb]# ip a s` +11. Copy the inet address on eth0 and paste it into a text file, as we'll need it shortly. + +## _Set Up the NFS Client_: +1. In the Samba server terminal, install software:
+`[root@samba-server]# yum install nfs-utils -y` +2. Create a mount point:
+`[root@samba-server]# mkdir /mnt/nfs` +3. Check to see what's being shared out on the NFS server, replacing with the IP you copied earlier:
+`[root@samba-server]# showmount -e ` +4. To be able to mount NFS shares, we need start a daemon:
+`[root@samba-server]# systemctl start rpcbind` + +## _Mount the NFS Share_: +1. Mount it, replacing with the IP you copied earlier:
+`[root@samba-server]# mount -t nfs :/nfs /mnt/nfs` +2. Make sure you see it listed after running:
+`[root@samba-server]# mount` +3. Change directory:
+`[root@samba-server]# cd /mnt/nfs` +4. Create a file:
+`[root@samba-server nfs]# touch file` +5. List the contents:
+`[root@samba-server nfs]# ls` +> We should see the new file, called file. + +## References + +https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/0-linux/lab9/README.md b/Cloud/0-linux/lab9/README.md index 94e25d42..18340970 100644 --- a/Cloud/0-linux/lab9/README.md +++ b/Cloud/0-linux/lab9/README.md @@ -1,108 +1,108 @@ -# Processes Management - -Costa Rica - -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) - - -Last updated: 2025-07-10 - ----------------------- - -This is a summary based on [References](#references) - -> pid: process ID - -## Starting a Process -> When you start a process (run a command), two ways of do it: -1. Foreground Processes -2. Background Processes - -### _Foreground Processes_ -> By default, every process that you start runs in the foreground. It gets its input from the keyboard and sends its output to the screen.
-> While a program is running in the foreground and is time-consuming, no other commands can be run (start any other processes) because the prompt would not be available until the program finishes processing and comes out. - -### _Background Processes_ -> A background process runs without being connected to your keyboard. If the background process requires any keyboard input, it waits.
-> The advantage of running a process in the background is that you can run other commands; you do not have to wait until it completes to start another!
-> The simplest way to start a background process is to add an ampersand (`&`) at the end of the command.
- -## Listing Running Processes -> It is easy to see your own processes by running the `ps` (process status) command
-> One of the most commonly used flags for ps is the -f ( f for full) option, which provides more information as shown: - -`$ps -f` - -``` -UID PID PPID C STIME TTY TIME CMD -``` - -1. `UID`: User ID that this process belongs to (the person running it) -2. `PID`: Process ID -3. `PPID `: Parent process ID (the ID of the process that started it) -4. `C`: CPU utilization of process -5. `STIME`: Process start time -6. `TTY`: Terminal type associated with the process -7. `TIME`: CPU time taken by the process -8. `CMD`: The command that started this process - -> There are other options which can be used along with ps command: -1. `-a`: Shows information about all users -2. `-x`: Shows information about processes without terminals -3. `-u`: Shows additional information like -f option -4. `-e`: Displays extended information - -## Stopping Processes -> Sending a CTRL + C keystroke (the default interrupt character) will exit the command.
- -> If a process is running in the background, you should get its Job ID using the ps command. After that, you can use the kill command to kill the process, example: -``` -$ps -f -UID PID PPID C STIME TTY TIME CMD -amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one -amrood 6739 3662 0 10:22:54 pts/6 0:00 second_one -$kill 6738 -``` - -Or forced:
-`$kill -9 6738` - -## Parent and Child Processes -Each unix process has two ID numbers assigned to it: -- Process ID (pid) -- Parent process ID (ppid). - -> Each user process in the system has a parent process. Most of the commands that you run have the shell as their parent. - -## Zombie and Orphan Processes -> Normally, when a child process is killed, the parent process is updated via a SIGCHLD signal. Then the parent can do some other task or restart a new child as needed. However, sometimes the parent process is killed before its child is killed. In this case, the "parent of all processes," the init process, becomes the new PPID (parent process ID). In some cases, these processes are called orphan processes. - -> When a process is killed, a ps listing may still show the process with a Z state. This is a zombie or defunct process. The process is dead and not being used. These processes are different from the orphan processes. They have completed execution but still find an entry in the process table. - -## Daemon Processes - -> Daemons are system-related background processes that often run with the permissions of root and services requests from other processes. - -> A daemon has no controlling terminal. It cannot open /dev/tty. If you do a "ps -ef" and look at the tty field, all daemons will have a ? for the tty. - -> To be precise, a daemon is a process that runs in the background, usually waiting for something to happen that it is capable of working with. For example, a printer daemon waiting for print commands. - -> If you have a program that calls for lengthy processing, then it’s worth to make it a daemon and run it in the background. - -## Job ID Versus Process ID - -> Background and suspended processes are usually manipulated via job number (job ID). This number is different from the process ID and is used because it is shorter. - -> A job can consist of multiple processes running in a series or at the same time, in parallel. Using the job ID is easier than tracking individual processes. - -## References -[1] From https://www.tutorialspoint.com/unix/unix-processes.htm
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Processes Management + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) + + +Last updated: 2025-07-11 + +---------------------- + +This is a summary based on [References](#references) + +> pid: process ID + +## Starting a Process +> When you start a process (run a command), two ways of do it: +1. Foreground Processes +2. Background Processes + +### _Foreground Processes_ +> By default, every process that you start runs in the foreground. It gets its input from the keyboard and sends its output to the screen.
+> While a program is running in the foreground and is time-consuming, no other commands can be run (start any other processes) because the prompt would not be available until the program finishes processing and comes out. + +### _Background Processes_ +> A background process runs without being connected to your keyboard. If the background process requires any keyboard input, it waits.
+> The advantage of running a process in the background is that you can run other commands; you do not have to wait until it completes to start another!
+> The simplest way to start a background process is to add an ampersand (`&`) at the end of the command.
+ +## Listing Running Processes +> It is easy to see your own processes by running the `ps` (process status) command
+> One of the most commonly used flags for ps is the -f ( f for full) option, which provides more information as shown: + +`$ps -f` + +``` +UID PID PPID C STIME TTY TIME CMD +``` + +1. `UID`: User ID that this process belongs to (the person running it) +2. `PID`: Process ID +3. `PPID `: Parent process ID (the ID of the process that started it) +4. `C`: CPU utilization of process +5. `STIME`: Process start time +6. `TTY`: Terminal type associated with the process +7. `TIME`: CPU time taken by the process +8. `CMD`: The command that started this process + +> There are other options which can be used along with ps command: +1. `-a`: Shows information about all users +2. `-x`: Shows information about processes without terminals +3. `-u`: Shows additional information like -f option +4. `-e`: Displays extended information + +## Stopping Processes +> Sending a CTRL + C keystroke (the default interrupt character) will exit the command.
+ +> If a process is running in the background, you should get its Job ID using the ps command. After that, you can use the kill command to kill the process, example: +``` +$ps -f +UID PID PPID C STIME TTY TIME CMD +amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one +amrood 6739 3662 0 10:22:54 pts/6 0:00 second_one +$kill 6738 +``` + +Or forced:
+`$kill -9 6738` + +## Parent and Child Processes +Each unix process has two ID numbers assigned to it: +- Process ID (pid) +- Parent process ID (ppid). + +> Each user process in the system has a parent process. Most of the commands that you run have the shell as their parent. + +## Zombie and Orphan Processes +> Normally, when a child process is killed, the parent process is updated via a SIGCHLD signal. Then the parent can do some other task or restart a new child as needed. However, sometimes the parent process is killed before its child is killed. In this case, the "parent of all processes," the init process, becomes the new PPID (parent process ID). In some cases, these processes are called orphan processes. + +> When a process is killed, a ps listing may still show the process with a Z state. This is a zombie or defunct process. The process is dead and not being used. These processes are different from the orphan processes. They have completed execution but still find an entry in the process table. + +## Daemon Processes + +> Daemons are system-related background processes that often run with the permissions of root and services requests from other processes. + +> A daemon has no controlling terminal. It cannot open /dev/tty. If you do a "ps -ef" and look at the tty field, all daemons will have a ? for the tty. + +> To be precise, a daemon is a process that runs in the background, usually waiting for something to happen that it is capable of working with. For example, a printer daemon waiting for print commands. + +> If you have a program that calls for lengthy processing, then it’s worth to make it a daemon and run it in the background. + +## Job ID Versus Process ID + +> Background and suspended processes are usually manipulated via job number (job ID). This number is different from the process ID and is used because it is shorter. + +> A job can consist of multiple processes running in a series or at the same time, in parallel. Using the job ID is easier than tracking individual processes. + +## References +[1] From https://www.tutorialspoint.com/unix/unix-processes.htm
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/README.md b/Cloud/1-terraform/README.md index 30872c0c..829a76ab 100644 --- a/Cloud/1-terraform/README.md +++ b/Cloud/1-terraform/README.md @@ -7,7 +7,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------------------- diff --git a/Cloud/1-terraform/lab0/README.md b/Cloud/1-terraform/lab0/README.md index 9f7aede5..023a9ccc 100644 --- a/Cloud/1-terraform/lab0/README.md +++ b/Cloud/1-terraform/lab0/README.md @@ -1,95 +1,95 @@ -# Installing Terraform and Working with Terraform Providers - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -### _Download zip_: - -`$ wget -c ` - -For Windows:
- -> See [Install Terraform On Windows 10 – Learn IT And DevOps Daily](https://github.com/brown9804/DevOps-Agile-Cloud_path/blob/main/Cloud/_docs/refs/Install%20Terraform%20On%20Windows%2010%20%E2%80%93%20Learn%20IT%20And%20DevOps%20Daily.pdf) - - -Binary List link:https://releases.hashicorp.com/terraform - -Recommended: https://releases.hashicorp.com/terraform/0.13.4/ - -### _Unzip_: - -`$ unzip terraform_0.13.4_linux_amd64.zip` - -`$ ls` - -### _Move dir to be accessed_: - -`$ sudo mv terraform /usr/sbin` - -`$ ls` - -`$ terraform version` - -### _Access providers_: - -`$ mkdir providers` - -`$ cd providers/` - -`$ ls` - -`$ vim main.tf` - -`$ cat main.tf` - -`$ export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - - -### _Initializes_: - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## References - -[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
-[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
-[3] From https://releases.hashicorp.com/terraform/0.13.4/
-[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview - - -
- Total views -

Refresh Date: 2025-07-10

-
+# Installing Terraform and Working with Terraform Providers + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +### _Download zip_: + +`$ wget -c ` + +For Windows:
+ +> See [Install Terraform On Windows 10 – Learn IT And DevOps Daily](https://github.com/brown9804/DevOps-Agile-Cloud_path/blob/main/Cloud/_docs/refs/Install%20Terraform%20On%20Windows%2010%20%E2%80%93%20Learn%20IT%20And%20DevOps%20Daily.pdf) + + +Binary List link:https://releases.hashicorp.com/terraform + +Recommended: https://releases.hashicorp.com/terraform/0.13.4/ + +### _Unzip_: + +`$ unzip terraform_0.13.4_linux_amd64.zip` + +`$ ls` + +### _Move dir to be accessed_: + +`$ sudo mv terraform /usr/sbin` + +`$ ls` + +`$ terraform version` + +### _Access providers_: + +`$ mkdir providers` + +`$ cd providers/` + +`$ ls` + +`$ vim main.tf` + +`$ cat main.tf` + +`$ export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + + +### _Initializes_: + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## References + +[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
+[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
+[3] From https://releases.hashicorp.com/terraform/0.13.4/
+[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview + + +
+ Total views +

Refresh Date: 2025-07-10

+
\ No newline at end of file diff --git a/Cloud/1-terraform/lab1/README.md b/Cloud/1-terraform/lab1/README.md index e2547b33..1030edc4 100644 --- a/Cloud/1-terraform/lab1/README.md +++ b/Cloud/1-terraform/lab1/README.md @@ -1,92 +1,92 @@ -# Using Terraform CLI Commands (workspace and state) to Manipulate a Terraform Deployment - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - - -## _Clone files_: - -`$ git clone https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations.git` - -`$ ls` - -`$ cd content-hashicorp-certified-terraform-associate-foundations/section4-lesson3` - -`$ ls` - -## _Initialize_: - -`$ terraform workspace list` - -`$ terraform workspace new test` - -`$ terraform init` - -`$ cat main.tf` - -`$ cat network.tf` - -`$ terraform workspace list` - -`$ terraform apply --auto-approve` - -`$ terraform state list` - -> Inside other workspace - -`$ terraform workspace select default` - -`$ terraform state list` - -`$ cat main.tf` - -`$ terraform workspace list` - -`$ terraform apply --auto-approve` - -`$ terraform state list` - -`$ ls` - -> Deleting resources - -`$ terraform workspace select test` - -`$ terraform destroy --auto-approve` - -`$ terraform workspace select default` - -`$ terraform destroy --auto-approve` - -`$ terraform workspace delete test` - -`$ terraform workspace list` - -## References - -[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
-[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
-[3] From https://releases.hashicorp.com/terraform/0.13.4/
-[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Using Terraform CLI Commands (workspace and state) to Manipulate a Terraform Deployment + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + + +## _Clone files_: + +`$ git clone https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations.git` + +`$ ls` + +`$ cd content-hashicorp-certified-terraform-associate-foundations/section4-lesson3` + +`$ ls` + +## _Initialize_: + +`$ terraform workspace list` + +`$ terraform workspace new test` + +`$ terraform init` + +`$ cat main.tf` + +`$ cat network.tf` + +`$ terraform workspace list` + +`$ terraform apply --auto-approve` + +`$ terraform state list` + +> Inside other workspace + +`$ terraform workspace select default` + +`$ terraform state list` + +`$ cat main.tf` + +`$ terraform workspace list` + +`$ terraform apply --auto-approve` + +`$ terraform state list` + +`$ ls` + +> Deleting resources + +`$ terraform workspace select test` + +`$ terraform destroy --auto-approve` + +`$ terraform workspace select default` + +`$ terraform destroy --auto-approve` + +`$ terraform workspace delete test` + +`$ terraform workspace list` + +## References + +[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
+[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
+[3] From https://releases.hashicorp.com/terraform/0.13.4/
+[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab2/README.md b/Cloud/1-terraform/lab2/README.md index fed54042..b5f689fb 100644 --- a/Cloud/1-terraform/lab2/README.md +++ b/Cloud/1-terraform/lab2/README.md @@ -1,93 +1,93 @@ -# Building and Testing a Basic Terraform Module - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## _Initialize_: - -`$ terraform version` - -`$ mkdir terraform_project` - -`$ cd terraform_project/` - -> Module - -`$ mkdir -p modules/vpc` - -`$ cd ~/terraform_project/modules/vpc/` - -`$ vim main.tf` - -`$ cat main.tf` - -`$ vim variables.tf` - -`$ cat variables.tf` - -`$ vim output.tf` - -`$ cat output.tf` - -`$ ls` - -> Main Code - -`$ cd ~/terraform_project/` - -`$ ls` - -`$ vim main.tf` - -`$ cat main.tf` - -`$ vim output.tf` - -`$ cat output.tf` - -`$ ls` - -> Execution - -`$ terraform fmt -recursive` - -`$ terraform init` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply --auto-approve` - -`$ terraform state list` - -`$ terraform destroy --auto-approve` - -## References - -[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
-[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
-[3] From https://releases.hashicorp.com/terraform/0.13.4/
-[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Building and Testing a Basic Terraform Module + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## _Initialize_: + +`$ terraform version` + +`$ mkdir terraform_project` + +`$ cd terraform_project/` + +> Module + +`$ mkdir -p modules/vpc` + +`$ cd ~/terraform_project/modules/vpc/` + +`$ vim main.tf` + +`$ cat main.tf` + +`$ vim variables.tf` + +`$ cat variables.tf` + +`$ vim output.tf` + +`$ cat output.tf` + +`$ ls` + +> Main Code + +`$ cd ~/terraform_project/` + +`$ ls` + +`$ vim main.tf` + +`$ cat main.tf` + +`$ vim output.tf` + +`$ cat output.tf` + +`$ ls` + +> Execution + +`$ terraform fmt -recursive` + +`$ terraform init` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply --auto-approve` + +`$ terraform state list` + +`$ terraform destroy --auto-approve` + +## References + +[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
+[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
+[3] From https://releases.hashicorp.com/terraform/0.13.4/
+[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab3/README.md b/Cloud/1-terraform/lab3/README.md index d209a3dc..3d80a7e3 100644 --- a/Cloud/1-terraform/lab3/README.md +++ b/Cloud/1-terraform/lab3/README.md @@ -1,92 +1,92 @@ -# Exploring Terraform State Functionality - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -## _Connect to the server_: - -`ssh @` - -## _Initialize_: - -`$ terraform version` - -`$ minikube status` - -`$ ls` - -`$ cd lab_code/` - -`$ ls` - -`$ cd section2-hol1/` - -`$ ls` - -`$ cat main.tf` - -`$ terraform init` - -`$ terraform plan` - -`$ ls` - -`$ terraform apply --auto-approve` - -`$ ls` - -`$ kubectl get pods` - -`$ terraform state list` - -`$ terraform state show kubernetes_deployment.tf-k8s-deployment | egrep replicas` - -`$ vim main.tf` - -_Change replicas from 2 to 4_ - -`$ terraform plan` - -`$ terraform apply --auto-approve` - -`$ kubectl get pods` - -`$ terraform state show kubernetes_deployment.tf-k8s-deployment | egrep replicas` - -`$ terraform destroy --auto-approve` - -`$ kubectl get pods` - -`$ ls` - -`$ cat terraform.tfstate` - -`$ less terraform.tfstate.backup` - -_You can re-deploy using backup file_ - - -## References - -[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
-[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
-[3] From https://releases.hashicorp.com/terraform/0.13.4/
-[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Exploring Terraform State Functionality + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +## _Connect to the server_: + +`ssh @` + +## _Initialize_: + +`$ terraform version` + +`$ minikube status` + +`$ ls` + +`$ cd lab_code/` + +`$ ls` + +`$ cd section2-hol1/` + +`$ ls` + +`$ cat main.tf` + +`$ terraform init` + +`$ terraform plan` + +`$ ls` + +`$ terraform apply --auto-approve` + +`$ ls` + +`$ kubectl get pods` + +`$ terraform state list` + +`$ terraform state show kubernetes_deployment.tf-k8s-deployment | egrep replicas` + +`$ vim main.tf` + +_Change replicas from 2 to 4_ + +`$ terraform plan` + +`$ terraform apply --auto-approve` + +`$ kubectl get pods` + +`$ terraform state show kubernetes_deployment.tf-k8s-deployment | egrep replicas` + +`$ terraform destroy --auto-approve` + +`$ kubectl get pods` + +`$ ls` + +`$ cat terraform.tfstate` + +`$ less terraform.tfstate.backup` + +_You can re-deploy using backup file_ + + +## References + +[1] From https://help.acloud.guru/hc/en-us/articles/360001382275-Hands-On-Labs-Getting-Started?_ga=2.173162026.84959279.1650153500-266741931.1648820099
+[2] From https://github.com/linuxacademy/content-hashicorp-certified-terraform-associate-foundations
+[3] From https://releases.hashicorp.com/terraform/0.13.4/
+[4] From https://learn.acloud.guru/course/using-terraform-to-manage-applications-and-infrastructure/overview + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab4/README.md b/Cloud/1-terraform/lab4/README.md index 53f3dc3a..e77cdea9 100644 --- a/Cloud/1-terraform/lab4/README.md +++ b/Cloud/1-terraform/lab4/README.md @@ -1,40 +1,40 @@ -# Deploy an Azure Storage Account with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -## _Initialize_: - -`$ terraform init` - - -`$ terraform plan` - - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -## References - -[1] https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Deploy an Azure Storage Account with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +## _Initialize_: + +`$ terraform init` + + +`$ terraform plan` + + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +## References + +[1] https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab5/README.md b/Cloud/1-terraform/lab5/README.md index 788c76a6..85c41fdf 100644 --- a/Cloud/1-terraform/lab5/README.md +++ b/Cloud/1-terraform/lab5/README.md @@ -1,42 +1,42 @@ -# Deploy an Azure File Share and Blob Storage with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#references) - -> Upload the file using the CLI upload/download button - -## _Initialize_: - -`$ terraform init` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## References - -[1] https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Deploy an Azure File Share and Blob Storage with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#references) + +> Upload the file using the CLI upload/download button + +## _Initialize_: + +`$ terraform init` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## References + +[1] https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab6/README.md b/Cloud/1-terraform/lab6/README.md index ce4d5f31..89d124e7 100644 --- a/Cloud/1-terraform/lab6/README.md +++ b/Cloud/1-terraform/lab6/README.md @@ -1,52 +1,52 @@ -# Deploy Azure VNETs and Subnets with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Deploy Azure VNETs and Subnets with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab7/README.md b/Cloud/1-terraform/lab7/README.md index 73818664..f8ec817d 100644 --- a/Cloud/1-terraform/lab7/README.md +++ b/Cloud/1-terraform/lab7/README.md @@ -1,52 +1,52 @@ -# Create Azure NSGs with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Create Azure NSGs with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab8/README.md b/Cloud/1-terraform/lab8/README.md index 9dc34c9f..eebc7069 100644 --- a/Cloud/1-terraform/lab8/README.md +++ b/Cloud/1-terraform/lab8/README.md @@ -1,55 +1,55 @@ -# Deploying an Azure VM with Terraform - -Costa Rica - -Belinda Brown, belindabrownr04@gmail.com - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Deploying an Azure VM with Terraform + +Costa Rica + +Belinda Brown, belindabrownr04@gmail.com + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab9/README.md b/Cloud/1-terraform/lab9/README.md index 2cf0c07f..e4a25e4f 100644 --- a/Cloud/1-terraform/lab9/README.md +++ b/Cloud/1-terraform/lab9/README.md @@ -1,52 +1,52 @@ -# Deploying Web Applications - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ---------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
+# Deploying Web Applications + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +--------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
\ No newline at end of file diff --git a/Cloud/1-terraform/lab_10/README.md b/Cloud/1-terraform/lab_10/README.md index a83fbfa6..7e580f1e 100644 --- a/Cloud/1-terraform/lab_10/README.md +++ b/Cloud/1-terraform/lab_10/README.md @@ -1,52 +1,52 @@ -# Deploy a MySQL Database with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
+# Deploy a MySQL Database with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
\ No newline at end of file diff --git a/Cloud/1-terraform/lab_11/README.md b/Cloud/1-terraform/lab_11/README.md index f0126924..e3651acd 100644 --- a/Cloud/1-terraform/lab_11/README.md +++ b/Cloud/1-terraform/lab_11/README.md @@ -1,148 +1,148 @@ -# Migrating Terraform State to Terraform Cloud - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - - -## Set Up the Environment: - -### _Set Up and Apply Your Terraform Configuration_: - -1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. -2. Save and exit the file by pressing the Escape key and entering :wq!. -3. Open the resource_ids.txt file again:
-`vim ../resource_ids.txt` -4. Copy the subnet _id value. -5. Exit the file by pressing Escape and entering :q!. -6. Open the main.tf file for editing:
-`vim main.tf` -7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. -8. Save and exit the file by pressing the Escape key and entering :wq!. - - -### _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - - -### _Generate Your Access Key in the AWS Management Console_: -1. In a browser window, navigate to the AWS Management Console and log in with the credentials provided. -2. Under AWS services, click IAM. -3. On the IAM dashboard, under IAM resources, click Users. -4. In the list of users, click cloud_user. -5. Click the Security credentials tab. -6. Click the Create access key button. -7. In the Create access key pop-up, click the Download .csv file button to download the access key in a file. -> Note: You could also choose to copy and paste the Access key ID and Secret access key values directly from the Create access key pop-up in the next objective. - - -## Set Up Your Terraform Cloud Workspace: -### _Create the Workspace and Configure Your Environment Variables_: -1. In a new browser tab, navigate to https://app.terraform.io/session. -2. Click Create account and follow the prompts to create a new free account or click Sign in to log in with an existing account. -3. Once logged in, select the Start from scratch setup workflow option. -4. In the Organization name field, enter "ACG-Terraform-Labs". -> NOTE: If this name is already taken you can make your own name up for your organisation. -5. In the Email address field, enter your email address. -6. Click Create organization. -7. Select the CLI-driven workflow option. -8. In the Workspace Name field, enter "lab-migrate-state". -9. Click Create workspace. -10. In the workspace, click on the Variables tab. -11. Scroll down to the Environment Variables section, and click the + Add variable button. -12. In the Key field, type "AWS_ACCESS_KEY_ID". -13. In the Value field, copy and paste the Access key ID value from the Create access key pop-up in the AWS Management Console or from the CSV file you downloaded. -14. Select the Sensitive checkbox, and click Save variable. -15. Click the + Add variable button. -16. In the Key field, type "AWS_SECRET_ACCESS_KEY". -17. In the Value field, copy and paste the Secret access key value from the Create access key pop-up in the AWS Management Console or from the CSV file you downloaded. -18. Select the Sensitive checkbox, and click Save variable. - - -### _Create Your API Token for Terraform CLI Login_: -1. At the top-right of the Terraform Cloud window, click your user avatar and select User settings. -2. In the menu on the left, click Tokens. -3. Click Create an API token. -4. In the Description field, type "terraform_login". -5. Click Create API token. -6. Copy the API token that is displayed in the Create API token pop-up and click Done. -> Note: Be sure that you have copied the API token, as it will not be displayed again. You may want to paste it in an accessible location, just in case. -7. At the top-left of the Terraform Cloud window, click the Choose an organization drop-down and select ACG-Terraform-Labs. -8. In the list of workspaces, click lab-migrate-state. - - -## Adding the Backend Configuration: - -1. Back in the terminal, log in to Terraform Cloud from the CLI:
-`terraform login` -2. Uncomment the backend config within the main.tf -3. Save it. -4. Check that the configuration file has been formatted properly:
-`terraform fmt` -5. Initialize the working directory:
-`terraform init` -6. When prompted to copy the existing Terraform state to the new backend, type "yes" and hit Enter. Terraform will notify you when this has completed successfully. -7. Verify that the terraform.tfstate.backup file has been added to the directory:
-`ls -8. Delete the terraform.tfstate file:
-`rm -rf terraform.tfstate` - - -## Apply the Updated Configuration and Confirm the State Was Saved to Terraform Cloud: -1. Apply the updated configuration:
-`terraform apply` -2. Once the terraform apply has finished, navigate back to Terraform Cloud in the browser. -3. On the Overview tab for the workspace, verify that the last run appears as a new event in the Latest Run section and that 1 resource was applied under Resources. -4. Click on the States tab and verify that the state file appears. You can click on the file to view it. -5. Click on the Runs tab and view the latest runs that have completed. -6. To view more information about the run, click on the Overview tab and click the See details button for the run. - -## Reminder: - ->> Later on, remember to do the destroy: - -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Migrating Terraform State to Terraform Cloud + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + + +## Set Up the Environment: + +### _Set Up and Apply Your Terraform Configuration_: + +1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. +2. Save and exit the file by pressing the Escape key and entering :wq!. +3. Open the resource_ids.txt file again:
+`vim ../resource_ids.txt` +4. Copy the subnet _id value. +5. Exit the file by pressing Escape and entering :q!. +6. Open the main.tf file for editing:
+`vim main.tf` +7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. +8. Save and exit the file by pressing the Escape key and entering :wq!. + + +### _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + + +### _Generate Your Access Key in the AWS Management Console_: +1. In a browser window, navigate to the AWS Management Console and log in with the credentials provided. +2. Under AWS services, click IAM. +3. On the IAM dashboard, under IAM resources, click Users. +4. In the list of users, click cloud_user. +5. Click the Security credentials tab. +6. Click the Create access key button. +7. In the Create access key pop-up, click the Download .csv file button to download the access key in a file. +> Note: You could also choose to copy and paste the Access key ID and Secret access key values directly from the Create access key pop-up in the next objective. + + +## Set Up Your Terraform Cloud Workspace: +### _Create the Workspace and Configure Your Environment Variables_: +1. In a new browser tab, navigate to https://app.terraform.io/session. +2. Click Create account and follow the prompts to create a new free account or click Sign in to log in with an existing account. +3. Once logged in, select the Start from scratch setup workflow option. +4. In the Organization name field, enter "ACG-Terraform-Labs". +> NOTE: If this name is already taken you can make your own name up for your organisation. +5. In the Email address field, enter your email address. +6. Click Create organization. +7. Select the CLI-driven workflow option. +8. In the Workspace Name field, enter "lab-migrate-state". +9. Click Create workspace. +10. In the workspace, click on the Variables tab. +11. Scroll down to the Environment Variables section, and click the + Add variable button. +12. In the Key field, type "AWS_ACCESS_KEY_ID". +13. In the Value field, copy and paste the Access key ID value from the Create access key pop-up in the AWS Management Console or from the CSV file you downloaded. +14. Select the Sensitive checkbox, and click Save variable. +15. Click the + Add variable button. +16. In the Key field, type "AWS_SECRET_ACCESS_KEY". +17. In the Value field, copy and paste the Secret access key value from the Create access key pop-up in the AWS Management Console or from the CSV file you downloaded. +18. Select the Sensitive checkbox, and click Save variable. + + +### _Create Your API Token for Terraform CLI Login_: +1. At the top-right of the Terraform Cloud window, click your user avatar and select User settings. +2. In the menu on the left, click Tokens. +3. Click Create an API token. +4. In the Description field, type "terraform_login". +5. Click Create API token. +6. Copy the API token that is displayed in the Create API token pop-up and click Done. +> Note: Be sure that you have copied the API token, as it will not be displayed again. You may want to paste it in an accessible location, just in case. +7. At the top-left of the Terraform Cloud window, click the Choose an organization drop-down and select ACG-Terraform-Labs. +8. In the list of workspaces, click lab-migrate-state. + + +## Adding the Backend Configuration: + +1. Back in the terminal, log in to Terraform Cloud from the CLI:
+`terraform login` +2. Uncomment the backend config within the main.tf +3. Save it. +4. Check that the configuration file has been formatted properly:
+`terraform fmt` +5. Initialize the working directory:
+`terraform init` +6. When prompted to copy the existing Terraform state to the new backend, type "yes" and hit Enter. Terraform will notify you when this has completed successfully. +7. Verify that the terraform.tfstate.backup file has been added to the directory:
+`ls +8. Delete the terraform.tfstate file:
+`rm -rf terraform.tfstate` + + +## Apply the Updated Configuration and Confirm the State Was Saved to Terraform Cloud: +1. Apply the updated configuration:
+`terraform apply` +2. Once the terraform apply has finished, navigate back to Terraform Cloud in the browser. +3. On the Overview tab for the workspace, verify that the last run appears as a new event in the Latest Run section and that 1 resource was applied under Resources. +4. Click on the States tab and verify that the state file appears. You can click on the file to view it. +5. Click on the Runs tab and view the latest runs that have completed. +6. To view more information about the run, click on the Overview tab and click the See details button for the run. + +## Reminder: + +>> Later on, remember to do the destroy: + +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_12/README.md b/Cloud/1-terraform/lab_12/README.md index 9b30d927..66c678c6 100644 --- a/Cloud/1-terraform/lab_12/README.md +++ b/Cloud/1-terraform/lab_12/README.md @@ -1,82 +1,82 @@ -# Using Terraform Provisioners to Set Up an Apache Web Server on AWS - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - - -## _Connect to the server_: - -`ssh @` - - -## Examine the Code in the main.tf File: -> View the contents of the main.tf file using the cat command:
- -`cat main.tf` - -> Examine the code in the resource block and note the following:
-1. We are creating an AWS EC2 instance (virtual machine) named webserver. -2. We are passing a number of parameters for the resource, such as the AMI that the VM will be spun up as, the instance type, the private key that the instance will be using, the public IP attached to the instance, the security group applied to the instance, and the subnet ID where the VM will be spun up. - -> Note: All of these resources are actually being created via the setup.tf file, which you can view if desired. - -3. Examine the code in the provisioner block and note the following: -- The remote-exec keyword tells us that this is a remote provisioner, which invokes a script on a remote resource after it is created. -- The provisioner is using the parameters configured in the embedded connection block to connect to the AWS EC2 instance being created. -- The provisioner will then issue the commands configured in the inline block to install Apache webserver on CentOS through the yum package manager, start up the Apache server, create a single web page called My Test Website With Help From Terraform Provisioner as an index.html file, and move that file into the data directory of the webserver to be served out globally. - - - -## Deploy the Code and Access the Bootstrapped Webserver: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> As the code is being deployed, you will notice that the Terraform provisioner tries to connect to the EC2 instance, and once that connection is established, it will run the bootstrapping that was configured in the provisioner block against the instance.
- -> When complete, it will output the public IP for the Apache webserver as the Webserver-Public-IP value.
- -> Copy the IP address, paste it in a new browser window or tab, and press Enter.
- -> Verify that the web page displays as My Test Website With Help From Terraform Provisioner, validating that the provisioner within your code worked as intended. The commands configured in the provisioner code were issued and executed successfully on the EC2 instance that was created.
- -`$ terraform destroy` - -> Enter a value: yes - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Using Terraform Provisioners to Set Up an Apache Web Server on AWS + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + + +## _Connect to the server_: + +`ssh @` + + +## Examine the Code in the main.tf File: +> View the contents of the main.tf file using the cat command:
+ +`cat main.tf` + +> Examine the code in the resource block and note the following:
+1. We are creating an AWS EC2 instance (virtual machine) named webserver. +2. We are passing a number of parameters for the resource, such as the AMI that the VM will be spun up as, the instance type, the private key that the instance will be using, the public IP attached to the instance, the security group applied to the instance, and the subnet ID where the VM will be spun up. + +> Note: All of these resources are actually being created via the setup.tf file, which you can view if desired. + +3. Examine the code in the provisioner block and note the following: +- The remote-exec keyword tells us that this is a remote provisioner, which invokes a script on a remote resource after it is created. +- The provisioner is using the parameters configured in the embedded connection block to connect to the AWS EC2 instance being created. +- The provisioner will then issue the commands configured in the inline block to install Apache webserver on CentOS through the yum package manager, start up the Apache server, create a single web page called My Test Website With Help From Terraform Provisioner as an index.html file, and move that file into the data directory of the webserver to be served out globally. + + + +## Deploy the Code and Access the Bootstrapped Webserver: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> As the code is being deployed, you will notice that the Terraform provisioner tries to connect to the EC2 instance, and once that connection is established, it will run the bootstrapping that was configured in the provisioner block against the instance.
+ +> When complete, it will output the public IP for the Apache webserver as the Webserver-Public-IP value.
+ +> Copy the IP address, paste it in a new browser window or tab, and press Enter.
+ +> Verify that the web page displays as My Test Website With Help From Terraform Provisioner, validating that the provisioner within your code worked as intended. The commands configured in the provisioner code were issued and executed successfully on the EC2 instance that was created.
+ +`$ terraform destroy` + +> Enter a value: yes + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_13/README.md b/Cloud/1-terraform/lab_13/README.md index c790107c..c3a56e43 100644 --- a/Cloud/1-terraform/lab_13/README.md +++ b/Cloud/1-terraform/lab_13/README.md @@ -1,104 +1,106 @@ -# Make Changes to AWS Infrastructure Using Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -April, 2022 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - - -## Set Up the Environment: - -### _Set Up and Apply Your Terraform Configuration_: - -1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. -2. Save and exit the file by pressing the Escape key and entering :wq!. -3. Open the resource_ids.txt file again:
-`vim ../resource_ids.txt` -4. Copy the subnet _id value. -5. Exit the file by pressing Escape and entering :q!. -6. Open the main.tf file for editing:
-`vim main.tf` -7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. -8. Save and exit the file by pressing the Escape key and entering :wq!. - - -### _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - -## Deploy Configuration Changes: -1. Open the main.tf file in the current directory for editing:
-`vim main.tf` -2. Under the resource line, in the instance_type line, delete "t2.micro". -3. In the empty instance_type = line, enter "t3.micro". -4. Under the tags line, in the Name = line, delete "Batman". -5. In the empty Name = line, enter in "Robin". -6. Save and exit the file by pressing the Escape key and entering: `:wq` -7. Check that our format is correct:
-`terraform fmt` -8. Test the changes that we're going to make:
-`terraform plan` -9. Apply our configuration changes:
-`terraform apply` -> Enter a value: yes - -10. Confirm that our changes were made successfully:
-`terraform show` -> Check that instance_type is now set to t3.micro and the tags_all has the name set to Robin. - - -## Reminder: - -> Later on, remember to do the destroy: - -`$ terraform destroy` - -> Enter a value: yes - -> Confirm that Terraform is no longer managing any resources:
- -`terraform show` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Make Changes to AWS Infrastructure Using Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +April, 2022 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + + +## Set Up the Environment: + +### _Set Up and Apply Your Terraform Configuration_: + +1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. +2. Save and exit the file by pressing the Escape key and entering :wq!. +3. Open the resource_ids.txt file again:
+`vim ../resource_ids.txt` +4. Copy the subnet _id value. +5. Exit the file by pressing Escape and entering :q!. +6. Open the main.tf file for editing:
+`vim main.tf` +7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. +8. Save and exit the file by pressing the Escape key and entering :wq!. + + +### _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + +## Deploy Configuration Changes: +1. Open the main.tf file in the current directory for editing:
+`vim main.tf` +2. Under the resource line, in the instance_type line, delete "t2.micro". +3. In the empty instance_type = line, enter "t3.micro". +4. Under the tags line, in the Name = line, delete "Batman". +5. In the empty Name = line, enter in "Robin". +6. Save and exit the file by pressing the Escape key and entering: `:wq` +7. Check that our format is correct:
+`terraform fmt` +8. Test the changes that we're going to make:
+`terraform plan` +9. Apply our configuration changes:
+`terraform apply` +> Enter a value: yes + +10. Confirm that our changes were made successfully:
+`terraform show` +> Check that instance_type is now set to t3.micro and the tags_all has the name set to Robin. + + +## Reminder: + +> Later on, remember to do the destroy: + +`$ terraform destroy` + +> Enter a value: yes + +> Confirm that Terraform is no longer managing any resources:
+ +`terraform show` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ + +Last updated: 2025-07-11 diff --git a/Cloud/1-terraform/lab_14/README.md b/Cloud/1-terraform/lab_14/README.md index a15324f2..4bfe30b1 100644 --- a/Cloud/1-terraform/lab_14/README.md +++ b/Cloud/1-terraform/lab_14/README.md @@ -1,103 +1,105 @@ -# Use Output Variables to Query Data in AWS Using Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -April, 2022 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Set Up the Environment: - -### _Set Up and Apply Your Terraform Configuration_: - -1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. -2. Save and exit the file by pressing the Escape key and entering :wq!. -3. Open the resource_ids.txt file again:
-`vim ../resource_ids.txt` -4. Copy the subnet _id value. -5. Exit the file by pressing Escape and entering :q!. -6. Open the main.tf file for editing:
-`vim main.tf` -7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. -8. Save and exit the file by pressing the Escape key and entering :wq!. - -### _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - - -> Add Output Variables and Deploy Changes:
- -`$ terraform fmt` - -### _Confirm the Changes_: - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> View a simplified version of the output:
- -`terraform output` - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -> Confirm that Terraform is no longer managing any resources:
- -`terraform show` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Use Output Variables to Query Data in AWS Using Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +April, 2022 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Set Up the Environment: + +### _Set Up and Apply Your Terraform Configuration_: + +1. In the ami = line, delete the "DUMMY_VALUE_AMI_ID" value and paste in the AMI you copied from the resource_ids.txt file. +2. Save and exit the file by pressing the Escape key and entering :wq!. +3. Open the resource_ids.txt file again:
+`vim ../resource_ids.txt` +4. Copy the subnet _id value. +5. Exit the file by pressing Escape and entering :q!. +6. Open the main.tf file for editing:
+`vim main.tf` +7. In the subnet_id = line, delete the "DUMMY_VALUE_SUBNET_ID" and paste in the subnet ID you copied from the resource_ids.txt file. +8. Save and exit the file by pressing the Escape key and entering :wq!. + +### _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + + +> Add Output Variables and Deploy Changes:
+ +`$ terraform fmt` + +### _Confirm the Changes_: + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> View a simplified version of the output:
+ +`terraform output` + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +> Confirm that Terraform is no longer managing any resources:
+ +`terraform show` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ + +Last updated: 2025-07-11 diff --git a/Cloud/1-terraform/lab_15/README.md b/Cloud/1-terraform/lab_15/README.md index 5cadd295..e001bf6e 100644 --- a/Cloud/1-terraform/lab_15/README.md +++ b/Cloud/1-terraform/lab_15/README.md @@ -1,128 +1,128 @@ -# Make Changes to Azure Infrastructure Using Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - - -## _Update the virtual network's resource_group_name_: -1. Above Cloud Shell, copy your Azure resource group name. You may need to pull down your Cloud Shell terminal to see it. -2. To the right of the resource_group_name variable, replace with your copied resource group name. -3. Write and quit to save your changes: `:wq!` - - -### _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - -## Add a Subnet to the Configuration: -1. Edit the file:
-`vim azure_resource_block.tf` -2. Update the subnet's resource_group_name: -- Above Cloud Shell, copy your Azure resource group name. -- To the right of the resource_group_name variable, replace with your copied resource group name. -- Write and quit to save your changes: `:wq!` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - - -## Add a Tag to the Configuration: - -1. Uncomment the tag part within the main.tf. -2. Save it. - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - - -## Reminder: - ->> Later on, remember to do the destroy: - -`$ terraform destroy` - -> Enter a value: yes - ->> Confirm that Terraform is no longer managing any resources:
-`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Make Changes to Azure Infrastructure Using Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + + +## _Update the virtual network's resource_group_name_: +1. Above Cloud Shell, copy your Azure resource group name. You may need to pull down your Cloud Shell terminal to see it. +2. To the right of the resource_group_name variable, replace with your copied resource group name. +3. Write and quit to save your changes: `:wq!` + + +### _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + +## Add a Subnet to the Configuration: +1. Edit the file:
+`vim azure_resource_block.tf` +2. Update the subnet's resource_group_name: +- Above Cloud Shell, copy your Azure resource group name. +- To the right of the resource_group_name variable, replace with your copied resource group name. +- Write and quit to save your changes: `:wq!` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + + +## Add a Tag to the Configuration: + +1. Uncomment the tag part within the main.tf. +2. Save it. + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + + +## Reminder: + +>> Later on, remember to do the destroy: + +`$ terraform destroy` + +> Enter a value: yes + +>> Confirm that Terraform is no longer managing any resources:
+`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_16/README.md b/Cloud/1-terraform/lab_16/README.md index f7a8a458..44afd76e 100644 --- a/Cloud/1-terraform/lab_16/README.md +++ b/Cloud/1-terraform/lab_16/README.md @@ -1,101 +1,101 @@ -# Use Output Variables to Query Data in Azure Using Terraform - - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Deploy the Infrastructure: - -1. Under # Create a virtual network, next to resource_group_name, remove the filler name. -2. At the top of the screen, above the Cloud Shell terminal, copy the name of the resource group automatically created by this lab, above Resource group. -3. Paste it into the empty field next to resource_group_name. -4. Under #Create subnet, next to resource_group_name, delete the filler and paste our lab's resource group name. -5. Save and quit by pressing the Escape button and entering: `:wq` - - -### _Initializes_: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> To confirm that our configuration was successful and view all the details of our infrastructure:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - - -## Add the Outputs Variable File: - -> output.tf file added - -`$ terraform fmt` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> Display our outputs:
- -`terraform output` - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -> Confirm that Terraform is no longer managing any resources:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Use Output Variables to Query Data in Azure Using Terraform + + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Deploy the Infrastructure: + +1. Under # Create a virtual network, next to resource_group_name, remove the filler name. +2. At the top of the screen, above the Cloud Shell terminal, copy the name of the resource group automatically created by this lab, above Resource group. +3. Paste it into the empty field next to resource_group_name. +4. Under #Create subnet, next to resource_group_name, delete the filler and paste our lab's resource group name. +5. Save and quit by pressing the Escape button and entering: `:wq` + + +### _Initializes_: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> To confirm that our configuration was successful and view all the details of our infrastructure:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + + +## Add the Outputs Variable File: + +> output.tf file added + +`$ terraform fmt` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> Display our outputs:
+ +`terraform output` + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +> Confirm that Terraform is no longer managing any resources:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_17/README.md b/Cloud/1-terraform/lab_17/README.md index 25bdef6b..ffa9d32a 100644 --- a/Cloud/1-terraform/lab_17/README.md +++ b/Cloud/1-terraform/lab_17/README.md @@ -1,115 +1,115 @@ -# Use Terraform to Create a Kubernetes Deployment - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Create Your Kubernetes Cluster: -1. Create your Kubernetes cluster:
-`kind create cluster --name lab-terraform-kubernetes --config kind-config.yaml` -2. When the cluster is successfully created, you should see all the creation steps have green checkmarks, and you receive a 'Have a nice day!' message. -3. Copy the provided command and paste it in the terminal:
-`kubectl cluster-info --context kind-lab-terraform-kubernetes` -4. Verify your cluster was created:
-`kind get cluster` - - -## Configure Terraform for Use with the Kubernetes Cluster: -1. Run kubectl to get information about your cluster:
-`kubectl config view --minify --flatten --context=kind-lab-terraform-kubernetes` -2. Add the server address to your terraform.tfvars file: -- Scroll up to the server line and copy the server address. -- Edit the terraform.tfvars file:
-`vim terraform.tfvars` -- On the host line, enter insert mode and replace DUMMY VALUE with your copied server address. -- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` -3. Add the client certificate data to your terraform.tfvars file:
-- Scroll up to the client-certificate-data line and copy the full certificate details. -- Edit the terraform.tfvars file:
-`vim terraform.tfvars` -- On the client_certificate line, enter insert mode and replace DUMMY VALUE with your copied client certificate data. -- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` -4. Add the client key data to your terraform.tfvars file:
-- Scroll up to the client-key-data line and copy the full client key details. -- Edit the terraform.tfvars file:
-`vim terraform.tfvars` -- On the client_key line, enter insert mode and replace DUMMY VALUE with your copied client key data. -- Press ESC to exist insert mode, then write and quit to save your changes: `:wq!` -5. Add the certificate authority data to your terraform.tfvars file:
-- Scroll up to the certificate-authority-data line and copy the full certificate authority details. -- Edit the terraform.tfvars file:
-`vim terraform.tfvars` -- On the cluster_ca_certificate line, enter insert mode and replace DUMMY VALUE with your copied client authority data. -- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` -6. View your kubernetes.tf file:
-`vim kubernetes.tf` -> You can see this configuration file pulls from the terraform.tfvars file to declare the variables and then pass them to the Kubernetes provider. -7. Quit out of the file when you're finished reviewing it: `:q` - - -## Deploy Resources to the Kubernetes Cluster: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> View your deployment details:
- -`kubectl get deployments` - -> You should see your deployment, "long-live-the-bat" has two nodes up and running. - - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -> Confirm that Terraform is no longer managing any resources:
- -`terraform show` - -> View a list of the resources Terraform is managing:
- -`terraform state list` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Use Terraform to Create a Kubernetes Deployment + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Create Your Kubernetes Cluster: +1. Create your Kubernetes cluster:
+`kind create cluster --name lab-terraform-kubernetes --config kind-config.yaml` +2. When the cluster is successfully created, you should see all the creation steps have green checkmarks, and you receive a 'Have a nice day!' message. +3. Copy the provided command and paste it in the terminal:
+`kubectl cluster-info --context kind-lab-terraform-kubernetes` +4. Verify your cluster was created:
+`kind get cluster` + + +## Configure Terraform for Use with the Kubernetes Cluster: +1. Run kubectl to get information about your cluster:
+`kubectl config view --minify --flatten --context=kind-lab-terraform-kubernetes` +2. Add the server address to your terraform.tfvars file: +- Scroll up to the server line and copy the server address. +- Edit the terraform.tfvars file:
+`vim terraform.tfvars` +- On the host line, enter insert mode and replace DUMMY VALUE with your copied server address. +- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` +3. Add the client certificate data to your terraform.tfvars file:
+- Scroll up to the client-certificate-data line and copy the full certificate details. +- Edit the terraform.tfvars file:
+`vim terraform.tfvars` +- On the client_certificate line, enter insert mode and replace DUMMY VALUE with your copied client certificate data. +- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` +4. Add the client key data to your terraform.tfvars file:
+- Scroll up to the client-key-data line and copy the full client key details. +- Edit the terraform.tfvars file:
+`vim terraform.tfvars` +- On the client_key line, enter insert mode and replace DUMMY VALUE with your copied client key data. +- Press ESC to exist insert mode, then write and quit to save your changes: `:wq!` +5. Add the certificate authority data to your terraform.tfvars file:
+- Scroll up to the certificate-authority-data line and copy the full certificate authority details. +- Edit the terraform.tfvars file:
+`vim terraform.tfvars` +- On the cluster_ca_certificate line, enter insert mode and replace DUMMY VALUE with your copied client authority data. +- Press ESC to exit insert mode, then write and quit to save your changes: `:wq!` +6. View your kubernetes.tf file:
+`vim kubernetes.tf` +> You can see this configuration file pulls from the terraform.tfvars file to declare the variables and then pass them to the Kubernetes provider. +7. Quit out of the file when you're finished reviewing it: `:q` + + +## Deploy Resources to the Kubernetes Cluster: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> View your deployment details:
+ +`kubectl get deployments` + +> You should see your deployment, "long-live-the-bat" has two nodes up and running. + + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +> Confirm that Terraform is no longer managing any resources:
+ +`terraform show` + +> View a list of the resources Terraform is managing:
+ +`terraform state list` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_18/README.md b/Cloud/1-terraform/lab_18/README.md index ac3fed91..29db0fab 100644 --- a/Cloud/1-terraform/lab_18/README.md +++ b/Cloud/1-terraform/lab_18/README.md @@ -1,137 +1,137 @@ -# Manage Kubernetes Resources with Terraform - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Set Up the Lab Environment: -1. Create your Kubernetes cluster:
-`kind create cluster --name lab-terraform-kubernetes --config kind-config.yaml` -2. When the cluster is successfully created, you should see all the creation steps have green checkmarks, and you receive a 'Have a nice day!' message. -3. Copy the provided command and paste it in the terminal:
-`kubectl cluster-info --context kind-lab-terraform-kubernetes` -4. Verify your cluster was created:
-`kind get cluster` -5. Edit the cluster's host address:
-- Run kubectl to view the cluster's host address:
-`kubectl config view --minify --flatten --context=kind-lab-terraform-kubernetes` -- Copy the server address. -- Edit the variables file:
-`vim terraform.tfvars` -- On the host line, replace [DUMMY VALUE] with your copied server address. -- Write and quit to save the file:
-`:wq!` -6. Edit the cluster's SSL certificate: -- Copy the full client-certificate-data details. -- Edit the variables file:
-`vim terraform.tfvars` -- On the client_certificate line, replace [DUMMY VALUE] with your copied client-certificate-data details. -- Write and quit to save the file: `:wq!` -7. Edit the cluster's client key data: -- Copy the full client-key-data details. -- Edit the variables file:
-`vim terraform.tfvars` -- On the client_key line, replace [DUMMY VALUE] with your copied client-key-data details. -- Write and quit to save the file:`:wq!` -8. Edit the cluster's certificate authority data:
-- Copy the full certificate-authority-data details. -- Edit the variables file:
-`vim terraform.tfvars` -- On the cluster_ca_certificate line, replace [DUMMY VALUE] with your copied certificate-authority-data details. -- Write and quit to save the file:`:wq!` - - -## Deploy Resources to the Kubernetes Cluster: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - - -## Add a Service: - -`$ terraform apply` - -> Enter a value: yes - -1. Verify the NodePort service was applied successfully:
-`kubectl get services` -> You should see the NodePort service named robin listed in your services. - -## Scale the Nodes: -1. Edit the lab_kubernetes_resources.tf file:
-`vim lab_kubernetes_resources.tf` -2. Modify the replicas from 2 to 4: -``` -spec { -replicas = 4 -selector { - match_labels = { - App = "longlivethebat" - } -} -``` -3. Write and quit to save your change to the file: `:wq!` - -`$ terraform apply` - -> Enter a value: yes - -> Confirm the replicas were changed from 2 to 4, then type "yes" on the Enter a value line to confirm the apply. -4. Verify your deployment is now using 4 pods: -`kubectl get deployments` - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -> Delete your cluster:
- -`kind delete cluster --name lab-terraform-kubernetes` - -> Verify the cluster was deleted:
- -`kind get clusters` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Manage Kubernetes Resources with Terraform + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Set Up the Lab Environment: +1. Create your Kubernetes cluster:
+`kind create cluster --name lab-terraform-kubernetes --config kind-config.yaml` +2. When the cluster is successfully created, you should see all the creation steps have green checkmarks, and you receive a 'Have a nice day!' message. +3. Copy the provided command and paste it in the terminal:
+`kubectl cluster-info --context kind-lab-terraform-kubernetes` +4. Verify your cluster was created:
+`kind get cluster` +5. Edit the cluster's host address:
+- Run kubectl to view the cluster's host address:
+`kubectl config view --minify --flatten --context=kind-lab-terraform-kubernetes` +- Copy the server address. +- Edit the variables file:
+`vim terraform.tfvars` +- On the host line, replace [DUMMY VALUE] with your copied server address. +- Write and quit to save the file:
+`:wq!` +6. Edit the cluster's SSL certificate: +- Copy the full client-certificate-data details. +- Edit the variables file:
+`vim terraform.tfvars` +- On the client_certificate line, replace [DUMMY VALUE] with your copied client-certificate-data details. +- Write and quit to save the file: `:wq!` +7. Edit the cluster's client key data: +- Copy the full client-key-data details. +- Edit the variables file:
+`vim terraform.tfvars` +- On the client_key line, replace [DUMMY VALUE] with your copied client-key-data details. +- Write and quit to save the file:`:wq!` +8. Edit the cluster's certificate authority data:
+- Copy the full certificate-authority-data details. +- Edit the variables file:
+`vim terraform.tfvars` +- On the cluster_ca_certificate line, replace [DUMMY VALUE] with your copied certificate-authority-data details. +- Write and quit to save the file:`:wq!` + + +## Deploy Resources to the Kubernetes Cluster: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + + +## Add a Service: + +`$ terraform apply` + +> Enter a value: yes + +1. Verify the NodePort service was applied successfully:
+`kubectl get services` +> You should see the NodePort service named robin listed in your services. + +## Scale the Nodes: +1. Edit the lab_kubernetes_resources.tf file:
+`vim lab_kubernetes_resources.tf` +2. Modify the replicas from 2 to 4: +``` +spec { +replicas = 4 +selector { + match_labels = { + App = "longlivethebat" + } +} +``` +3. Write and quit to save your change to the file: `:wq!` + +`$ terraform apply` + +> Enter a value: yes + +> Confirm the replicas were changed from 2 to 4, then type "yes" on the Enter a value line to confirm the apply. +4. Verify your deployment is now using 4 pods: +`kubectl get deployments` + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +> Delete your cluster:
+ +`kind delete cluster --name lab-terraform-kubernetes` + +> Verify the cluster was deleted:
+ +`kind get clusters` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_19/README.md b/Cloud/1-terraform/lab_19/README.md index c38f2b3b..4c0f72f3 100644 --- a/Cloud/1-terraform/lab_19/README.md +++ b/Cloud/1-terraform/lab_19/README.md @@ -1,88 +1,88 @@ -# Use Terraform to Create an EKS Deployment - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Configure the AWS CLI: -`aws configure` - -1. When prompted for your AWS Access Key ID, copy and paste the Access Key. -2. When prompted for your AWS Secret Access Key, copy and paste in the Secret Access Key. -3. Press Enter to accept the default region. -4. Press Enter to accept the default output. - -## Deploy the EKS Cluster: - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ terraform init` - -`$ ls -a` - -`$ terraform fmt` - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -> Configure kubectl to interact with the cluster:
- -`aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)` - -> Confirm that kubectl was configured properly and that the cluster was successfully deployed:
- -`kubectl get cs` - -> The three components should be up and running with a status of Healthy. - -## Deploy the NGINX Pods: - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -`kubectl get deployments` - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -`terraform show` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Use Terraform to Create an EKS Deployment + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Configure the AWS CLI: +`aws configure` + +1. When prompted for your AWS Access Key ID, copy and paste the Access Key. +2. When prompted for your AWS Secret Access Key, copy and paste in the Secret Access Key. +3. Press Enter to accept the default region. +4. Press Enter to accept the default output. + +## Deploy the EKS Cluster: + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ terraform init` + +`$ ls -a` + +`$ terraform fmt` + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +> Configure kubectl to interact with the cluster:
+ +`aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)` + +> Confirm that kubectl was configured properly and that the cluster was successfully deployed:
+ +`kubectl get cs` + +> The three components should be up and running with a status of Healthy. + +## Deploy the NGINX Pods: + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +`kubectl get deployments` + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +`terraform show` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/1-terraform/lab_20/README.md b/Cloud/1-terraform/lab_20/README.md index ab1bc422..bfa45773 100644 --- a/Cloud/1-terraform/lab_20/README.md +++ b/Cloud/1-terraform/lab_20/README.md @@ -1,121 +1,121 @@ -# Troubleshooting a Terraform Deployment - -Costa Rica - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) - -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) -[brown9804](https://github.com/brown9804) - -Last updated: 2025-07-10 - ----------- - -This is a summary based on [References](#reference) - -## _Connect to the server_: - -`ssh @` - -## Correct the Variable Interpolation Error: -1. Edit the ami in the main.tf file. -- In the resource block, edit the ami line by replacing with your copied AMI. -2. Edit the subnet_id in the main.tf file: -- In the resource block, edit the subnetid line by replacing with your copied subnet ID. - -`export TF_LOG=TRACE` - -`export TF_LOG_PATH=./terraform.log` - -`$ ls -a` - -`$ terraform fmt` - -3. Apply line numbering to the file so you can identify the error more easily:
-`:set number` -4. Update line 25 as follows to correct the variable interpolation error:
-`Name = "${var.name}-learn"` - -`$ terraform fmt` - -`$ terraform init` - - -## Correct the Region Declaration Error: - -`$ terraform validate` - -1. Check the variables.tf file:
-`vim variables.tf` -> You should see the variable regions, which is causing the error. This should instead be region. - -2. Update regions to region in the variables.tf file to correct the region declaration error:
-``` -variable "region" { - description = 'The AWS region your resources will be deployed' -} -``` - -## Correct the Syntax Error for the Resource: - -`$ terraform validate` - -1. Edit the main.tf file. -2. Insert double quotes ("") around the ami and subnet_id values as follows to correct the syntax error:
-``` -resource "aws_instance" "web_app" - ami = "ami-" - subnet_id = "subnet-" -``` - -## Correct the Outputs Error: - -`$ terraform validate` - -1. Edit the outputs.tf file. -2. Correct the first output error by changing the instance_public_ip value from .public.ip to .pulic_ip as follows:
-``` -output "instance_public_ip" { - description = "Public IP address of the EC2 instance" - value = aws_instance.web_app.public_ip -} -``` -3. Correct the second output error by changing the instance_name value from tag to tags as follows:
-``` -output "instance_name" { - description = "Tags of the EC2 instance" - value = aws_instance.web_app.tags.Name -} -``` - -## Deploy the Infrastructure: - -`$ terraform validate` - -`$ terraform plan` - -`$ terraform apply` - -> Enter a value: yes - -## Reminder: - -> Later on, remember to do the destroy:
- -`$ terraform destroy` - -> Enter a value: yes - -`terraform show` - -## Reference: - -[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
- - -
- Total views -

Refresh Date: 2025-07-10

-
- +# Troubleshooting a Terraform Deployment + +Costa Rica + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) + +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-07-11 + +---------- + +This is a summary based on [References](#reference) + +## _Connect to the server_: + +`ssh @` + +## Correct the Variable Interpolation Error: +1. Edit the ami in the main.tf file. +- In the resource block, edit the ami line by replacing with your copied AMI. +2. Edit the subnet_id in the main.tf file: +- In the resource block, edit the subnetid line by replacing with your copied subnet ID. + +`export TF_LOG=TRACE` + +`export TF_LOG_PATH=./terraform.log` + +`$ ls -a` + +`$ terraform fmt` + +3. Apply line numbering to the file so you can identify the error more easily:
+`:set number` +4. Update line 25 as follows to correct the variable interpolation error:
+`Name = "${var.name}-learn"` + +`$ terraform fmt` + +`$ terraform init` + + +## Correct the Region Declaration Error: + +`$ terraform validate` + +1. Check the variables.tf file:
+`vim variables.tf` +> You should see the variable regions, which is causing the error. This should instead be region. + +2. Update regions to region in the variables.tf file to correct the region declaration error:
+``` +variable "region" { + description = 'The AWS region your resources will be deployed' +} +``` + +## Correct the Syntax Error for the Resource: + +`$ terraform validate` + +1. Edit the main.tf file. +2. Insert double quotes ("") around the ami and subnet_id values as follows to correct the syntax error:
+``` +resource "aws_instance" "web_app" + ami = "ami-" + subnet_id = "subnet-" +``` + +## Correct the Outputs Error: + +`$ terraform validate` + +1. Edit the outputs.tf file. +2. Correct the first output error by changing the instance_public_ip value from .public.ip to .pulic_ip as follows:
+``` +output "instance_public_ip" { + description = "Public IP address of the EC2 instance" + value = aws_instance.web_app.public_ip +} +``` +3. Correct the second output error by changing the instance_name value from tag to tags as follows:
+``` +output "instance_name" { + description = "Tags of the EC2 instance" + value = aws_instance.web_app.tags.Name +} +``` + +## Deploy the Infrastructure: + +`$ terraform validate` + +`$ terraform plan` + +`$ terraform apply` + +> Enter a value: yes + +## Reminder: + +> Later on, remember to do the destroy:
+ +`$ terraform destroy` + +> Enter a value: yes + +`terraform show` + +## Reference: + +[1] From https://learn.acloud.guru/course/bd8060c6-e408-4801-a4a3-8317c45319bf/dashboard
+ + +
+ Total views +

Refresh Date: 2025-07-10

+
+ diff --git a/Cloud/2-automation_principles/0_golang/README.md b/Cloud/2-automation_principles/0_golang/README.md index a7d25762..025b1a9b 100644 --- a/Cloud/2-automation_principles/0_golang/README.md +++ b/Cloud/2-automation_principles/0_golang/README.md @@ -6,7 +6,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------- diff --git a/Cloud/2-automation_principles/1_api_automations/3_countryinfo_travelers/README.md b/Cloud/2-automation_principles/1_api_automations/3_countryinfo_travelers/README.md index 07ee52a3..35b82724 100644 --- a/Cloud/2-automation_principles/1_api_automations/3_countryinfo_travelers/README.md +++ b/Cloud/2-automation_principles/1_api_automations/3_countryinfo_travelers/README.md @@ -8,7 +8,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------- diff --git a/Cloud/2-automation_principles/1_api_automations/README.md b/Cloud/2-automation_principles/1_api_automations/README.md index 6147d059..688da015 100644 --- a/Cloud/2-automation_principles/1_api_automations/README.md +++ b/Cloud/2-automation_principles/1_api_automations/README.md @@ -8,7 +8,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------------------- diff --git a/Cloud/2-automation_principles/README.md b/Cloud/2-automation_principles/README.md index 4fd90b2c..ec5c4bc8 100644 --- a/Cloud/2-automation_principles/README.md +++ b/Cloud/2-automation_principles/README.md @@ -8,7 +8,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------------------- diff --git a/Cloud/3-kubernetes_principles/README.md b/Cloud/3-kubernetes_principles/README.md index fe714ba1..a98ab4c9 100644 --- a/Cloud/3-kubernetes_principles/README.md +++ b/Cloud/3-kubernetes_principles/README.md @@ -8,7 +8,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------- diff --git a/Cloud/README.md b/Cloud/README.md index 3003bd3e..03dbdd92 100644 --- a/Cloud/README.md +++ b/Cloud/README.md @@ -4,7 +4,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2024-12-13 +Last updated: 2025-07-11 ---------------------- diff --git a/DevOps/README.md b/DevOps/README.md index 022a878d..debf07d4 100644 --- a/DevOps/README.md +++ b/DevOps/README.md @@ -5,7 +5,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2024-12-13 +Last updated: 2025-07-11 ---------- diff --git a/GitHub/demos/0_GithubAImodels.md b/GitHub/demos/0_GithubAImodels.md index 70172ec2..532930cb 100644 --- a/GitHub/demos/0_GithubAImodels.md +++ b/GitHub/demos/0_GithubAImodels.md @@ -4,7 +4,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-01-13 +Last updated: 2025-07-11 ---------------------- diff --git a/GitHub/demos/1_GitHubPagesOverview/README.md b/GitHub/demos/1_GitHubPagesOverview/README.md index 2954f2a0..5d346e87 100644 --- a/GitHub/demos/1_GitHubPagesOverview/README.md +++ b/GitHub/demos/1_GitHubPagesOverview/README.md @@ -4,7 +4,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-01-13 +Last updated: 2025-07-11 ---------------------- > **GitHub Pages** is a feature provided by GitHub that allows you to `host static websites directly from a GitHub repository`. It's a great way to showcase your projects, create personal websites, or host documentation for your repositories. diff --git a/Network/README.md b/Network/README.md index fb4c5607..259c39ab 100644 --- a/Network/README.md +++ b/Network/README.md @@ -4,7 +4,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------------------- diff --git a/README.md b/README.md index 89692080..c7d1c770 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,81 @@ -# Open Source Visitor Counter +# Cloud DevOps:
Learning Path - Overview Costa Rica -[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-07-10 +Last updated: 2025-07-11 ---------- -> This repository provides a customizable GitHub visitor counter that tracks and displays the number of visits to your GitHub profile or repository. The counter updates daily using the GitHub Traffic API and writes the total views directly into the README file. - -## Features - -- **Daily-updated visitor counting**: Fetches real visitor data from the GitHub Traffic API. -- **Markdown-based display**: Updates the README file with the total visitor count. -- **Open source and customizable**. - -## How it works - -> [!IMPORTANT] -> This counter is updated once per day (not real-time) and shows the total number of visits (including repeat visits) as reported by GitHub. - -- A GitHub Action workflow runs daily to fetch visitor data from the GitHub Traffic API. -- The action updates the `README.md` file with the total visitor count and the refresh timestamp. - -## How to use it - -1. **Add the Badge to Your Repository**: Include the following markdown in your `README.md` file, between the `START BADGE` and `END BADGE` (included), as shown in the bottom. -2. **Create a Personal Access Token**: - - Go to **GitHub Settings** > **Developer Settings** > **Personal Access Tokens**. - - Generate a new token with `repo` access. -3. **Save the Token as a Secret**: - - In your repository, navigate to **Settings** > **Secrets and Variables** > **Actions**. - - Add a new secret named `TRAFFIC_TOKEN` and paste the generated token. -4. **Add the Pipeline**: This single pipeline will fetch the visitor count, update the badge in the `README.md` file, and push the changes back to the repository. - - Create a GitHub Actions workflow (`update-metrics.yml`) in your repository to handle the visitor counter logic. - - Use the following content for the workflow: - - ```yaml - name: Update Visitor Counter - - on: - schedule: - - cron: '0 0 * * *' # Runs daily at midnight - workflow_dispatch: # Allows manual triggering - - jobs: - update-counter: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install dependencies - run: npm install @brown9804/github-visitor-counter - - - name: Run visitor counter script - run: node node_modules/@brown9804/github-visitor-counter/update_repo_views_counter.js - env: - TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }} - REPO: ${{ github.repository }} - - - name: Commit and push changes - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add README.md metrics.json - git commit -m "Update visitor count" - git push - ``` - -## Files structure - -- `README.md`: Contains instructions and displays the visitor count badge. -- `update_repo_views_counter.js`: Script to fetch visitor count data from the GitHub Traffic API and update the `README.md` file. -- `package.json`: Defines dependencies and scripts for the project. -- `LICENSE`: Specifies the license for the project. - -> [!IMPORTANT] -> -> - Replace `` and `` with your actual values. -> - Use a Personal Access Token (PAT) with `repo` access as `TRAFFIC_TOKEN` secret in each target repository. -> - The action will trigger the visitor counter logic in the main repository and update the badge dynamically. +> Provides the essential knowledge required to work effectively within Azure and embrace DevOps/Agile methodologies. Additionally, it offers insights into fundamental cloud concepts. + +
+Table of Contents (Click to expand) + +- [Agile](./Agile) +- [DevOps](./DevOps) +- [Network](./Network) +- [GitHub](https://github.com/brown9804/CloudDevOps_LPath/tree/main/GitHub) +- [Cloud Principles](./Cloud) + - [0. Linux](./Cloud/0-linux) + - [Working with Users and Permissions](./Cloud/0-linux/lab0) + - [System Service Management, Runlevels and Boot Targets](./Cloud/0-linux/lab1) + - [Securely Accessing Your System](./Cloud/0-linux/lab2) + - [Package Management and Troubleshooting](./Cloud/0-linux/lab3) + - [File Management, Permissions and Backup](./Cloud/0-linux/lab4) + - [Working with Text Files and Streams](./Cloud/0-linux/lab5) + - [Linux Device Management](./Cloud/0-linux/lab6) + - [The Linux Shell](./Cloud/0-linux/lab7) + - [Networking](./Cloud/0-linux/lab8) + - [Processes Management](./Cloud/0-linux/lab9) + - [1. Terraform](./Cloud/1-terraform) + - [Installing Terraform and Working with Terraform Providers](./Cloud/1-terraform/lab0) + - [Using Terraform CLI Commands (workspace and state) to Manipulate a Terraform Deployment](./Cloud/1-terraform/lab1) + - [Building and Testing a Basic Terraform Module](./Cloud/1-terraform/lab2) + - [Exploring Terraform State Functionality](./Cloud/1-terraform/lab3) + - [Deploy an Azure Storage Account with Terraform](./Cloud/1-terraform/lab4) + - [Deploy an Azure File Share and Blob Storage with Terraform](./Cloud/1-terraform/lab5) + - [Deploy Azure VNETs and Subnets with Terraform](./Cloud/1-terraform/lab6) + - [Create Azure NSGs with Terraform](./Cloud/1-terraform/lab7) + - [Deploying an Azure VM with Terraform](./Cloud/1-terraform/lab8) + - [Deploy a Web Application with Terraform](./Cloud/1-terraform/lab9) + - [Deploy a MySQL Database with Terraform](./Cloud/1-terraform/lab_10) + - [Migrating Terraform State to Terraform Cloud](./Cloud/1-terraform/lab_11) + - [Using Terraform Provisioners to Set Up an Apache Web Server on AWS](./Cloud/1-terraform/lab_12) + - [Make Changes to AWS Infrastructure Using Terraform](./Cloud/1-terraform/lab_13) + - [Use Output Variables to Query Data in AWS Using Terraform](./Cloud/1-terraform/lab_14) + - [Make Changes to Azure Infrastructure Using Terraform](./Cloud/1-terraform/lab_15) + - [Use Output Variables to Query Data in Azure Using Terraform](./Cloud/1-terraform/lab_16) + - [Use Terraform to Create a Kubernetes Deployment](./Cloud/1-terraform/lab_17) + - [Manage Kubernetes Resources with Terraform](./Cloud/1-terraform/lab_18) + - [Use Terraform to Create an EKS Deployment](./Cloud/1-terraform/lab_19) + - [Troubleshooting a Terraform Deployment](./Cloud/1-terraform/lab_20) + + - [Automation Principles](./Cloud/2-automation_principles) + - [Kubernetes Principles](./Cloud/3-kubernetes_principles) + +
+ +## Overview + +- SDLC - [What is and how it works](https://agilie.com/blog/what-is-the-software-development-life-cycle-sdlc-and-how-does-it-work) + +![image](https://github.com/brown9804/SDLC-Cloud_Lpath/assets/24630902/e809d790-87d4-41a1-b9ea-071327ab6ef2) + +![Benefits](https://github.com/brown9804/SDLC-Cloud_Lpath/assets/24630902/dc014629-a069-44f3-b657-7f8d39968272) + +![image](https://github.com/brown9804/SDLC-Cloud_Lpath/assets/24630902/a3b6522f-88c2-4ede-a477-09280f5584b9) + +- SDLC - [Methodologies](https://datarob.com/sdlc-methodologies/) + +![image](https://github.com/brown9804/SDLC-Cloud_Lpath/assets/24630902/5ba714af-4238-48d3-9043-cbcd64a590f1) +
- Total views + Total views

Refresh Date: 2025-07-10