You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :)
3
+
:information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
4
4
5
-
:bar_chart: There are currently **1999** questions
5
+
:bar_chart: There are currently **1999**exercises and questions
6
6
7
7
:books: To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository
8
8
9
9
:warning: You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [FAQ page](faq.md) for more details
10
10
11
-
:busts_in_silhouette: [Join](https://www.facebook.com/groups/538897960007080) our [DevOps community](https://www.facebook.com/groups/538897960007080) where we have discussions and share resources on DevOps
11
+
:busts_in_silhouette: Join our [DevOps community](https://www.facebook.com/groups/538897960007080) where we have discussions and share resources on DevOps
12
12
13
13
:pencil: You can add more questions and exercises by submitting pull requests :) Read about contribution guidelines [here](CONTRIBUTING.md)
| Elastic IP | EC2, Networking |[Exercise](elastic_ip.md)|[Solution](solutions/elastic_ip.md)| Easy |
24
+
| Placement Groups Creation | EC2, Placement Groups |[Exercise](placement_groups.md)|[Solution](solutions/placement_groups.md)| Easy |
25
+
| Elastic Network Interfaces | EC2, ENI |[Exercise](elastic_network_interfaces.md)|[Solution](solutions/elastic_network_interfaces.md)| Easy |
24
26
25
27
#### AWS - Lambda
26
28
@@ -303,13 +305,33 @@ Storage Optimized:
303
305
* Use cases: databases, OLTP system, distributing file systems
304
306
</b></details>
305
307
308
+
<details>
309
+
<summary>What can you attach to an EC2 instance in order to store data?</summary><br><b>
310
+
311
+
EBS
312
+
</b></details>
313
+
314
+
##### AWS EC2 - EBS
315
+
306
316
<details>
307
317
<summary>What is EBS?</summary><br><b>
308
318
309
319
"provides block level storage volumes for use with EC2 instances. EBS volumes behave like raw, unformatted block devices."
310
320
More on EBS [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html)
311
321
</b></details>
312
322
323
+
<details>
324
+
<summary>What happens to EC2 disk (EBS) when the instance is terminated?</summary><br><b>
325
+
326
+
All the related EBS volumes are removed and data is lost.
327
+
</b></details>
328
+
329
+
<details>
330
+
<summary>What happens to the EC2 disk (EBS) when the instance is stopped?</summary><br><b>
331
+
332
+
Disk is intact and can be used when the instance starts.
333
+
</b></details>
334
+
313
335
<details>
314
336
<summary>What EC2 pricing models are there?</summary><br><b>
315
337
@@ -509,6 +531,24 @@ Set of Spot instance and if you want, also on-demand instances.
509
531
* capacityOptimized: optimized based on the number of instances
510
532
</b></details>
511
533
534
+
<details>
535
+
<summary>From networking perspective, what do you get by default when running an EC2 instance?</summary><br><b>
536
+
537
+
A private IP and a public IP.
538
+
</b></details>
539
+
540
+
<details>
541
+
<summary>What happens when you hibernate an EC2 instance?</summary><br><b>
542
+
543
+
[AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html: "Hibernation saves the contents from the instance memory (RAM) to your Amazon Elastic Block Store (Amazon EBS) root volume."
544
+
</b></details>
545
+
546
+
<details>
547
+
<summary>True or False? Using EC2 hibernate option results in having faster instance boot</summary><br><b>
548
+
549
+
True. This is because the operating system isn't restarted or stopped.
550
+
</b></details>
551
+
512
552
#### AWS - Lambda
513
553
514
554
<details>
@@ -1100,8 +1140,26 @@ False. Only one internet gateway can be attached to a single VPC.
1100
1140
1101
1141
<details>
1102
1142
<summary>What is an Elastic IP address?</summary><br><b>
1103
-
An Elastic IP address is a reserved public IP address that you can assign to any EC2 instance in a particular region, until you choose to release it.
1104
-
When you associate an Elastic IP address with an EC2 instance, it replaces the default public IP address. If an external hostname was allocated to the instance from your launch settings, it will also replace this hostname; otherwise, it will create one for the instance. The Elastic IP address remains in place through events that normally cause the address to change, such as stopping or restarting the instance.
1143
+
1144
+
[AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html): "An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is allocated to your AWS account, and is yours until you release it. By using an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account."
1145
+
</b></details>
1146
+
1147
+
<details>
1148
+
<summary>True or False? When stopping and starting an EC2 instance, its public IP changes</summary><br><b>
1149
+
1150
+
True
1151
+
</b></details>
1152
+
1153
+
<details>
1154
+
<summary>What are the best practices around Elastic IP?</summary><br><b>
1155
+
1156
+
The best practice is actually not using them in the first place. It's more common to use a load balancer without a public IP or use a random public IP and register a DNS record to it
1157
+
</b></details>
1158
+
1159
+
<details>
1160
+
<summary>True or False? An Elastic IP is free, as long it's not associated with an EC2 instance</summary><br><b>
1161
+
1162
+
False. An Elastic IP is free of charge as long as **it is ** associated with an EC2 instance. This instance should be running and should have only one Elastic IP.
1105
1163
</b></details>
1106
1164
1107
1165
<details>
@@ -1125,6 +1183,88 @@ Read more about it [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec
1125
1183
Allows you to connect your corporate network to AWS network.
1126
1184
</b></details>
1127
1185
1186
+
<details>
1187
+
<summary>True or False? When you need a fixed public IP for your instance, you should use an Elastic IP</summary><br><b>
[AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html): "An elastic network interface is a logical networking component in a VPC that represents a virtual network card."
1198
+
</b></details>
1199
+
1200
+
<details>
1201
+
<summary>Name at least three attributes the Elastic Network Interfaces (ENI) can include</summary><br><b>
1202
+
1203
+
1. One public IPv4 address
1204
+
2. Mac Address
1205
+
3. A primary private IPv4 address (from the address range of your VPC)
1206
+
</b></details>
1207
+
1208
+
<details>
1209
+
<summary>True or False? ENI are not bound to a specific availability zone</summary><br><b>
1210
+
1211
+
False. ENI are bound to specific availability zone.
1212
+
</b></details>
1213
+
1214
+
<details>
1215
+
<summary>True or False? ENI can be created independently of EC2 instances</summary><br><b>
1216
+
1217
+
True. They can be attached later on and on the fly (for failover purposes).
1218
+
</b></details>
1219
+
1220
+
##### AWS EC2 - Placement Groups
1221
+
1222
+
<details>
1223
+
<summary>What are "Placement Groups"?</summary><br><b>
1224
+
1225
+
[AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html): "When you launch a new EC2 instance, the EC2 service attempts to place the instance in such a way that all of your instances are spread out across underlying hardware to minimize correlated failures. You can use placement groups to influence the placement of a group of interdependent instances to meet the needs of your workload."
1226
+
</b></details>
1227
+
1228
+
<details>
1229
+
<summary>What Placement Groups strategies are there?</summary><br><b>
1230
+
1231
+
* Cluster: places instance close together in an AZ.
1232
+
* Spread: spreads the instance across the hardware
1233
+
* Partition: spreads the instances across different partitions (= different sets of hardware/racks) within an AZ
1234
+
</b></details>
1235
+
1236
+
<details>
1237
+
<summary>For each of the following scenarios choose a placement group strategy:
1238
+
1239
+
* High availability is top priority
1240
+
* Low latency between instances
1241
+
* Instances must be isolated from each other
1242
+
* Big Data applications that are partition aware
1243
+
* Big Data process that needs to end quickly</summary><br><b>
1244
+
1245
+
* High availability is top priority - Spread
1246
+
* Low latency between instances - Cluster
1247
+
* Instances must be isolated from each other - Spread
1248
+
* Big Data applications that are partition aware - Partition
1249
+
* Big Data process that needs to end quickly - Cluster
1250
+
</b></details>
1251
+
1252
+
<details>
1253
+
<summary>What are the cons and pros of the "Cluster" placement group strategy?</summary><br><b>
1254
+
1255
+
Cons: if the hardware fails, all instances fail
1256
+
Pros: Low latency & high throughput network
1257
+
</b></details>
1258
+
1259
+
<details>
1260
+
<summary>What are the cons and pros of the "Spread" placement group strategy?</summary><br><b>
1261
+
1262
+
Cons:
1263
+
* Current limitation is 7 instances per AZ (per replacement group)
1264
+
Pros:
1265
+
* Maximized high availability (instances on different hardware, span across AZs)
1266
+
</b></details>
1267
+
1128
1268
#### AWS - Identify the service or tool
1129
1269
1130
1270
<details>
@@ -1668,4 +1808,3 @@ AWS definition: "Amazon Simple Queue Service (SQS) is a fully managed message qu
1668
1808
1669
1809
Learn more about it [here](https://aws.amazon.com/sqs)
A. Create a placement group. It should be one with a low latency network. Make sure to launch an instance as part of this placement group.
6
+
B. Create another placement group. This time high availability is a priority
7
+
8
+
### Solution
9
+
10
+
A.
11
+
1. Go to EC2 service
12
+
2. Click on "Placement Groups" under "Network & Security"
13
+
3. Click on "Create placement group"
14
+
4. Give it a name and choose the "Cluster" placement strategy because the requirement is low latency network
15
+
5. Click on "Create group"
16
+
6. Go to "Instances" and click on "Launch an instance". Choose any properties you would like, just make sure to check "Add instance to placement group" and choose the placement group you've created
17
+
18
+
B.
19
+
1. Go to EC2 service
20
+
2. Click on "Placement Groups" under "Network & Security"
21
+
3. Click on "Create placement group"
22
+
4. Give it a name and choose the "Spread" placement strategy because the requirement is high availability as top priority
0 commit comments