Lab_5_SysOps_Resources_Linux_v2.5

时间:2023-02-08 12:34:13
System Operations - Lab 5: Managing Resources Using Tagging (Linux) - 2.5
================================================================================================================== Using this command reference. ================================================================================================================== 1. Locate the section you need. Each section in this file matches a section in the lab instructions. 2. Replace items in angle brackets - < > - with appropriate values. For example, in this command you would replace the value - <JobFlowID> - (including the brackets) with the parameter indicated in the lab instructions: elastic-mapreduce --list <JobFlowID>. You can also use find and replace to change bracketed parameters in bulk. 3. Do NOT enable the Word Wrap feature in Windows Notepad or the text editor you use to view this file. ++++1. Managing Resources Using Tags++++ ==================================================================================================================
1.2 Find Development Instances for Project
================================================================================================================== 1.2.1 Find all instances in account with a tag named Project, and a value of ERPSystem aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" 1.2.2 Limit output of above command to InstanceId aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" --query 'Reservations[*].Instances[*].InstanceId' 1.2.3 Include multiple selected values in command output aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" --query 'Reservations[*].Instances[*].{ID:InstanceId,AZ:Placement.AvailabilityZone}' 1.2.4 Include the Project tag in the output aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" --query 'Reservations[*].Instances[*].{ID:InstanceId,AZ:Placement.AvailabilityZone,Project:Tags[?Key==`Project`] | [0].Value}' 1.2.5 Include the Environment and Version tags in the output aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" --query 'Reservations[*].Instances[*].{ID:InstanceId,AZ:Placement.AvailabilityZone,Project:Tags[?Key==`Project`] | [0].Value,Environment:Tags[?Key==`Environment`] | [0].Value,Version:Tags[?Key==`Version`] | [0].Value}' 1.2.6 Add an additional filter to restrict the return results to instances whose Environment tag is set to development: aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" "Name=tag:Environment,Values=development" --query 'Reservations[*].Instances[*].{ID:InstanceId,AZ:Placement.AvailabilityZone,Project:Tags[?Key==`Project`] | [0].Value,Environment:Tags[?Key==`Environment`] | [0].Value,Version:Tags[?Key==`Version`] | [0].Value}' ==================================================================================================================
1.3 Change Version Tag for Development Instances
================================================================================================================== 1.3.3 Run shell script to change Version tag on select instances ./change-resource-tags.sh 1.3.4 Verify changes aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" --query 'Reservations[*].Instances[*].{ID:InstanceId,AZ:Placement.AvailabilityZone,Project:Tags[?Key==`Project`] | [0].Value,Environment:Tags[?Key==`Environment`] | [0].Value,Version:Tags[?Key==`Version`] | [0].Value}' ++++2. Stop and Start Resources by Tag++++ ==================================================================================================================
2.2. Stop and Restart ERPProject Development Instances
================================================================================================================== 2.2.1 Stop all development instances for the ERPSystem project ./stopinator.php -t"Project=ERPSystem;Environment=development" 2.2.5 Restart the development instances for the ERPSystem project ./stopinator.php -t"Project=ERPSystem;Environment=development" -s ++++3. Challenge 1 Solution - Terminate Non-Compliant Instances++++ ==================================================================================================================
3.3. Run the Script
================================================================================================================== 3.3.4 Run the terminate-instance.php script ./terminate-instances.php -region <region> -subnetid <subnet-id> 漏 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab_5_SysOps_Resources_Linux_v2.5的更多相关文章

    随机推荐

    1. Web性能优化之动态合并JS&sol;CSS文件并缓存客户端

      来源:微信公众号CodeL 在Web开发过程中,会产生很多的js/css文件,传统的引用外部文件的方式会产生多次的http请求,从而加重服务器负担且网页加载缓慢,如何在一次请求中将多个文件一次加载出来 ...

    2. php 使用phpmailer 发送邮件&lpar;附带中文乱码的解决方法&rpar;

      下载phpmailer ,在程序里包含class.phpmailer.php 类  ,这里有中文乱码的解决方法 实例代码如下 <html> <head> <title&g ...

    3. laravel--上传

      1.视图里面 2.控制器里面 //收集表单提交数据 $input = $request->all(); //查看是否有图片提交上来 if ($request->hasFile('title ...

    4. Java语言----三种循环语句的区别

      ------- android培训.java培训.期待与您交流! ---------- 第一种:for循环 循环结构for语句的格式:       for(初始化表达式;条件表达式;循环后的操作表达式 ...

    5. spring技术翻译开始

      从今天开始,我会坚持每天花费两个小时来翻译一本英文书(当然自己觉得绝对算得上是经典),可能我英文水平有限,但也请路过的高人予以指点. 如果有翻译的出入很大,望各位告知,本人一定更改.决定翻译的目的有两 ...

    6. Spark&colon;使用Spark Shell的两个示例

      Spark:使用Spark Shell的两个示例 Python 行数统计 ** 注意: **使用的是Hadoop的HDFS作为持久层,需要先配置Hadoop 命令行代码 # pyspark >& ...

    7. oracle 归档日志满 报错ORA-00257&colon; archiver error&period; Connect internal only&comma; until freed

      归档日志满导致无法用户无法登陆 具体处理办法 --用户登陆 Microsoft Windows [Version 6.1.7601] Copyright (c) Microsoft Corporati ...

    8. 百度地图API-javascript-web地图的应用

      html部分的代码 <div class="maxwidth"> <div class="address clearfix"> < ...

    9. cloneNode和replaceChild

      node.cloneNode(deep) var node=document.getElementById("myList2").lastChild.cloneNode(true) ...

    10. Nginx安装及配置详解【转】

      nginx概述 nginx是一款*的.开源的.高性能的HTTP服务器和反向代理服务器:同时也是一个IMAP.POP3.SMTP代理服务器:nginx可以作为一个HTTP服务器进行网站的发布处理,另外 ...