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. Java环境环境配置

    1. 下载并安装JDK,假如安装在D盘 2. 右键计算机->属性->高级系统设置->环境变量 3. 点击新建系统变量:系统变量名:JAVA_HOME   系统变量值:D:\Progr ...

  2. 整理一下以前的Html+css3复习笔记

    一.html5新特性  常用语义标签:nav footer header section mark  功能标签 video audio iframe canvas(画布和绘图功能)  input新ty ...

  3. C/C++ http协议加载sessionID

    很多时候,使用一个既定的API虽然可以去完成一些任务,但是还是不如自己写来的那么随性和自由. http协议,最常用的get,post两种方式传输数据,关于post,有时候,需要用到加载cookie信息 ...

  4. 创建JOB

    1.创建一张表g_test create table G_TEST ( ID NUMBER(12), C_DATE DATE ) 2.创建一个sequence create sequence G_SE ...

  5. 关于在biweb 中安装完成后 首页上方报错问题的解决

    在利用biweb进行网站开发的时候 首先得安装biweb    安装就是下一步,,,下一步....下一步   最后就成功了 .但是有种情况我总是竟让遇到,而已有的人安装会遇到 有的人安装就不会遇到,后 ...

  6. Linux服务器数据库的导入和导出

    一.导出: 用mysqldump命令行 命令格式 mysqldump -u 用户名 -p 数据库名 > 数据库名.sql 范例: mysqldump -u root -p abc > ab ...

  7. BZOJ2733 [HNOI2012]永无乡

    直接平衡树启发式合并就好了...貌似是个很高端的东西.. 貌似可以证明splay的启发式合并是均摊$O(nlogn)$的...而其他平衡树都不行,所以其他的复杂度都是$O(nlog^2n)的$的 所以 ...

  8. Windows下搭建Git开发环境

    Windows下搭建Git开发环境主要有以下三种方法: 1,VS,vs2013和vs2015中已经集成了git插件了 2,msysGit+TortoiseGit 3,msysGit+SourceTre ...

  9. PhoneGap与Jquery Mobile组合开发android应用的配置

    PhoneGap与Jquery Mobile结合开发android应用的配置 由于工作需要,用到phonegap与jquery moblie搭配,开发android应用程序. 这些技术自己之前也都没接 ...

  10. Android Studio的一些快捷键

    以下这些也是百度的其他人整理的.后面有新的会加进来. AS的快捷键容易和QQ,微信等冲突,可以手动关掉或者修改其他软件的热键 Ctrl+G / Ctrl+Alt+Shift+G:查询变量或者函数或者类 ...