uopspop

Untitled

Aug 8th, 2018
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.99 KB | None | 0 0
  1. {
  2. "AWSTemplateFormatVersion": "2010-09-09",
  3. "Parameters": {
  4. "KeyPairName": {
  5. "Description": "You must have your public key on your aws - ec2 - network & security - key pairs section",
  6. "Type": "String"
  7. }
  8. },
  9. "Resources": {
  10. "vpcd3adf3aa": {
  11. "Type": "AWS::EC2::VPC",
  12. "Properties": {
  13. "CidrBlock": "10.99.0.0/16",
  14. "InstanceTenancy": "default",
  15. "EnableDnsSupport": "true",
  16. "EnableDnsHostnames": "false",
  17. "Tags": [
  18. {
  19. "Key": "Name",
  20. "Value": "st-cloudformation"
  21. }
  22. ]
  23. },
  24. "Metadata": {
  25. "AWS::CloudFormation::Designer": {
  26. "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  27. }
  28. }
  29. },
  30. "subnet1b9e3a50": {
  31. "Type": "AWS::EC2::Subnet",
  32. "Properties": {
  33. "CidrBlock": "10.99.0.0/24",
  34. "AvailabilityZone": "us-west-2b",
  35. "VpcId": {
  36. "Ref": "vpcd3adf3aa"
  37. },
  38. "Tags": [
  39. {
  40. "Key": "Name",
  41. "Value": "st-cloudformation"
  42. }
  43. ]
  44. },
  45. "Metadata": {
  46. "AWS::CloudFormation::Designer": {
  47. "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
  48. }
  49. }
  50. },
  51. "igw14057072": {
  52. "Type": "AWS::EC2::InternetGateway",
  53. "Properties": {
  54. "Tags": [
  55. {
  56. "Key": "Name",
  57. "Value": "st-cloudformation"
  58. }
  59. ]
  60. },
  61. "Metadata": {
  62. "AWS::CloudFormation::Designer": {
  63. "id": "6c215780-cc5d-4f7c-9029-f833506b0ab6"
  64. }
  65. }
  66. },
  67. "acl80f553f8": {
  68. "Type": "AWS::EC2::NetworkAcl",
  69. "Properties": {
  70. "VpcId": {
  71. "Ref": "vpcd3adf3aa"
  72. },
  73. "Tags": [
  74. {
  75. "Key": "Name",
  76. "Value": "st-cloudformation"
  77. }
  78. ]
  79. },
  80. "Metadata": {
  81. "AWS::CloudFormation::Designer": {
  82. "id": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
  83. }
  84. }
  85. },
  86. "rtb41104239": {
  87. "Type": "AWS::EC2::RouteTable",
  88. "Properties": {
  89. "VpcId": {
  90. "Ref": "vpcd3adf3aa"
  91. },
  92. "Tags": [
  93. {
  94. "Key": "Name",
  95. "Value": "st-cloudformation-public"
  96. }
  97. ]
  98. },
  99. "Metadata": {
  100. "AWS::CloudFormation::Designer": {
  101. "id": "c93e3089-9729-4403-b730-6737ff99ad2a"
  102. }
  103. }
  104. },
  105. "instancei012c21b7d8e198887": {
  106. "Type": "AWS::EC2::Instance",
  107. "Properties": {
  108. "DisableApiTermination": "false",
  109. "InstanceInitiatedShutdownBehavior": "stop",
  110. "ImageId": "ami-223f945a",
  111. "InstanceType": "t2.micro",
  112. "KeyName": {
  113. "Ref": "KeyPairName"
  114. },
  115. "UserData": { "Fn::Base64" : { "Fn::Join" : ["", [
  116. "#!/bin/bash\n",
  117. "cd /home/ec2-user/\n",
  118. "sudo yum remove docker docker-common container-selinux docker-selinux docker-engine docker-engine-selinux\n",
  119. "sudo yum install -y yum-utils device-mapper-persistent-data lvm2\n",
  120. "sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n",
  121. "sudo yum makecache fast\n",
  122. "sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.66-1.el7.noarch.rpm\n",
  123. "sudo yum install -y docker-ce\n",
  124. "sudo systemctl start docker\n",
  125. "sudo docker run hello-world\n"
  126. ]]}},
  127. "Monitoring": "false",
  128. "Tags": [
  129. {
  130. "Key": "Name",
  131. "Value": "st-cloudformation"
  132. }
  133. ],
  134. "NetworkInterfaces": [
  135. {
  136. "DeleteOnTermination": "true",
  137. "Description": "Primary network interface",
  138. "DeviceIndex": 0,
  139. "SubnetId": {
  140. "Ref": "subnet1b9e3a50"
  141. },
  142. "PrivateIpAddresses": [
  143. {
  144. "PrivateIpAddress": "10.99.0.151",
  145. "Primary": "true"
  146. }
  147. ],
  148. "GroupSet": [
  149. {
  150. "Ref": "sgstcloudformation"
  151. }
  152. ],
  153. "AssociatePublicIpAddress": "true"
  154. }
  155. ]
  156. },
  157. "Metadata": {
  158. "AWS::CloudFormation::Designer": {
  159. "id": "5467a301-e1f2-4320-93d1-c8c93b84306f"
  160. }
  161. }
  162. },
  163. "sgstcloudformation": {
  164. "Type": "AWS::EC2::SecurityGroup",
  165. "Properties": {
  166. "GroupDescription": "launch-wizard-37 created 2018-04-17T19:55:21.240+08:00",
  167. "VpcId": {
  168. "Ref": "vpcd3adf3aa"
  169. },
  170. "Tags": [
  171. {
  172. "Key": "Name",
  173. "Value": "st-cloudformation"
  174. }
  175. ]
  176. },
  177. "Metadata": {
  178. "AWS::CloudFormation::Designer": {
  179. "id": "c8ac8be7-0b4a-4496-a8d3-1a54e2e42d5a"
  180. }
  181. }
  182. },
  183. "acl1": {
  184. "Type": "AWS::EC2::NetworkAclEntry",
  185. "Properties": {
  186. "CidrBlock": "0.0.0.0/0",
  187. "Egress": "true",
  188. "Protocol": "-1",
  189. "RuleAction": "allow",
  190. "RuleNumber": "100",
  191. "NetworkAclId": {
  192. "Ref": "acl80f553f8"
  193. }
  194. },
  195. "Metadata": {
  196. "AWS::CloudFormation::Designer": {
  197. "id": "811c3c9c-8e1d-413a-b908-22829b94aa85"
  198. }
  199. }
  200. },
  201. "acl2": {
  202. "Type": "AWS::EC2::NetworkAclEntry",
  203. "Properties": {
  204. "CidrBlock": "0.0.0.0/0",
  205. "Protocol": "-1",
  206. "RuleAction": "allow",
  207. "RuleNumber": "100",
  208. "NetworkAclId": {
  209. "Ref": "acl80f553f8"
  210. }
  211. },
  212. "Metadata": {
  213. "AWS::CloudFormation::Designer": {
  214. "id": "1b8e9c00-552b-421b-bbd6-3d8773821d7e"
  215. }
  216. }
  217. },
  218. "subnetacl1": {
  219. "Type": "AWS::EC2::SubnetNetworkAclAssociation",
  220. "Properties": {
  221. "NetworkAclId": {
  222. "Ref": "acl80f553f8"
  223. },
  224. "SubnetId": {
  225. "Ref": "subnet1b9e3a50"
  226. }
  227. },
  228. "Metadata": {
  229. "AWS::CloudFormation::Designer": {
  230. "id": "455b97eb-821c-4699-a909-5fd0b44cabbd"
  231. }
  232. }
  233. },
  234. "route1": {
  235. "Type": "AWS::EC2::Route",
  236. "Properties": {
  237. "DestinationCidrBlock": "0.0.0.0/0",
  238. "RouteTableId": {
  239. "Ref": "rtb41104239"
  240. },
  241. "GatewayId": {
  242. "Ref": "igw14057072"
  243. }
  244. },
  245. "Metadata": {
  246. "AWS::CloudFormation::Designer": {
  247. "id": "0b13684f-bf67-44c6-a0ce-d788f1544e49"
  248. }
  249. }
  250. },
  251. "SubnetRouteTableAssociation008": {
  252. "Type": "AWS::EC2::SubnetRouteTableAssociation",
  253. "Properties": {
  254. "RouteTableId": {
  255. "Ref": "rtb41104239"
  256. },
  257. "SubnetId": {
  258. "Ref": "subnet1b9e3a50"
  259. }
  260. },
  261. "Metadata": {
  262. "AWS::CloudFormation::Designer": {
  263. "id": "8db514ed-7e5f-42db-868e-e430d15b5bb8"
  264. }
  265. }
  266. },
  267. "ingress1": {
  268. "Type": "AWS::EC2::SecurityGroupIngress",
  269. "Properties": {
  270. "GroupId": {
  271. "Ref": "sgstcloudformation"
  272. },
  273. "IpProtocol": "tcp",
  274. "FromPort": "22",
  275. "ToPort": "22",
  276. "CidrIp": "0.0.0.0/0"
  277. }
  278. },
  279. "ingress2": {
  280. "Type": "AWS::EC2::SecurityGroupIngress",
  281. "Properties": {
  282. "GroupId": {
  283. "Ref": "sgstcloudformation"
  284. },
  285. "IpProtocol": "tcp",
  286. "FromPort": "8080",
  287. "ToPort": "8080",
  288. "CidrIp": "0.0.0.0/0"
  289. }
  290. },
  291. "egress1": {
  292. "Type": "AWS::EC2::SecurityGroupEgress",
  293. "Properties": {
  294. "GroupId": {
  295. "Ref": "sgstcloudformation"
  296. },
  297. "IpProtocol": "-1",
  298. "CidrIp": "0.0.0.0/0"
  299. }
  300. },
  301. "EC2DHCP2HAZ9": {
  302. "Type": "AWS::EC2::DHCPOptions",
  303. "Properties": {
  304. "DomainName": "us-west-2.compute.internal",
  305. "DomainNameServers": [
  306. "AmazonProvidedDNS"
  307. ]
  308. },
  309. "Metadata": {
  310. "AWS::CloudFormation::Designer": {
  311. "id": "1f2155f4-d323-494e-b157-1e0a8c2f338c"
  312. }
  313. }
  314. },
  315. "EC2VPCD1WN10": {
  316. "Type": "AWS::EC2::VPCDHCPOptionsAssociation",
  317. "Properties": {
  318. "DhcpOptionsId": {
  319. "Ref": "EC2DHCP2HAZ9"
  320. },
  321. "VpcId": {
  322. "Ref": "vpcd3adf3aa"
  323. }
  324. },
  325. "Metadata": {
  326. "AWS::CloudFormation::Designer": {
  327. "id": "4e13c20d-0335-44e7-a6f4-d8a27ee8642c"
  328. }
  329. }
  330. },
  331. "EC2VPCG4ESOD": {
  332. "Type": "AWS::EC2::VPCGatewayAttachment",
  333. "Properties": {
  334. "VpcId": {
  335. "Ref": "vpcd3adf3aa"
  336. },
  337. "InternetGatewayId": {
  338. "Ref": "igw14057072"
  339. }
  340. },
  341. "Metadata": {
  342. "AWS::CloudFormation::Designer": {
  343. "id": "16e7a5e4-f13b-4591-b6c8-3722c22f229f"
  344. }
  345. }
  346. }
  347. },
  348. "Description": "st-formation",
  349. "Metadata": {
  350. "AWS::CloudFormation::Designer": {
  351. "6c215780-cc5d-4f7c-9029-f833506b0ab6": {
  352. "size": {
  353. "width": 60,
  354. "height": 60
  355. },
  356. "position": {
  357. "x": -130,
  358. "y": 240
  359. },
  360. "z": 0,
  361. "embeds": []
  362. },
  363. "100906b8-589d-45d3-9633-4eb9e44ddbaf": {
  364. "size": {
  365. "width": 690,
  366. "height": 690
  367. },
  368. "position": {
  369. "x": -10,
  370. "y": 80
  371. },
  372. "z": 1,
  373. "embeds": [
  374. "c93e3089-9729-4403-b730-6737ff99ad2a",
  375. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  376. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
  377. ]
  378. },
  379. "c8ac8be7-0b4a-4496-a8d3-1a54e2e42d5a": {
  380. "size": {
  381. "width": 60,
  382. "height": 60
  383. },
  384. "position": {
  385. "x": -130,
  386. "y": 540
  387. },
  388. "z": 0,
  389. "embeds": [],
  390. "iscontainedinside": [
  391. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  392. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  393. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  394. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  395. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  396. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  397. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  398. "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  399. ]
  400. },
  401. "c93e3089-9729-4403-b730-6737ff99ad2a": {
  402. "size": {
  403. "width": 240,
  404. "height": 240
  405. },
  406. "position": {
  407. "x": 400,
  408. "y": 160
  409. },
  410. "z": 2,
  411. "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  412. "embeds": [
  413. "0b13684f-bf67-44c6-a0ce-d788f1544e49"
  414. ],
  415. "iscontainedinside": [
  416. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  417. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  418. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  419. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  420. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  421. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  422. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  423. "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  424. ]
  425. },
  426. "0b13684f-bf67-44c6-a0ce-d788f1544e49": {
  427. "size": {
  428. "width": 60,
  429. "height": 60
  430. },
  431. "position": {
  432. "x": 520,
  433. "y": 170
  434. },
  435. "z": 3,
  436. "parent": "c93e3089-9729-4403-b730-6737ff99ad2a",
  437. "embeds": [],
  438. "isassociatedwith": [
  439. "6c215780-cc5d-4f7c-9029-f833506b0ab6"
  440. ],
  441. "iscontainedinside": [
  442. "c93e3089-9729-4403-b730-6737ff99ad2a",
  443. "c93e3089-9729-4403-b730-6737ff99ad2a",
  444. "c93e3089-9729-4403-b730-6737ff99ad2a",
  445. "c93e3089-9729-4403-b730-6737ff99ad2a",
  446. "c93e3089-9729-4403-b730-6737ff99ad2a",
  447. "c93e3089-9729-4403-b730-6737ff99ad2a",
  448. "c93e3089-9729-4403-b730-6737ff99ad2a",
  449. "c93e3089-9729-4403-b730-6737ff99ad2a"
  450. ]
  451. },
  452. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1": {
  453. "size": {
  454. "width": 330,
  455. "height": 240
  456. },
  457. "position": {
  458. "x": 40,
  459. "y": 150
  460. },
  461. "z": 2,
  462. "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  463. "embeds": [
  464. "1b8e9c00-552b-421b-bbd6-3d8773821d7e",
  465. "811c3c9c-8e1d-413a-b908-22829b94aa85"
  466. ],
  467. "iscontainedinside": [
  468. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  469. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  470. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  471. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  472. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  473. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  474. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  475. "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  476. ]
  477. },
  478. "1b8e9c00-552b-421b-bbd6-3d8773821d7e": {
  479. "size": {
  480. "width": 60,
  481. "height": 60
  482. },
  483. "position": {
  484. "x": 70,
  485. "y": 210
  486. },
  487. "z": 3,
  488. "parent": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  489. "embeds": [],
  490. "iscontainedinside": [
  491. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  492. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  493. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  494. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  495. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  496. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  497. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  498. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
  499. ]
  500. },
  501. "811c3c9c-8e1d-413a-b908-22829b94aa85": {
  502. "size": {
  503. "width": 60,
  504. "height": 60
  505. },
  506. "position": {
  507. "x": 190,
  508. "y": 210
  509. },
  510. "z": 3,
  511. "parent": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  512. "embeds": [],
  513. "iscontainedinside": [
  514. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  515. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  516. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  517. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  518. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  519. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  520. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
  521. "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
  522. ]
  523. },
  524. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061": {
  525. "size": {
  526. "width": 240,
  527. "height": 240
  528. },
  529. "position": {
  530. "x": 40,
  531. "y": 500
  532. },
  533. "z": 2,
  534. "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  535. "embeds": [
  536. "5467a301-e1f2-4320-93d1-c8c93b84306f"
  537. ],
  538. "iscontainedinside": [
  539. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  540. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  541. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  542. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  543. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  544. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  545. "100906b8-589d-45d3-9633-4eb9e44ddbaf",
  546. "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  547. ]
  548. },
  549. "8db514ed-7e5f-42db-868e-e430d15b5bb8": {
  550. "source": {
  551. "id": "c93e3089-9729-4403-b730-6737ff99ad2a"
  552. },
  553. "target": {
  554. "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
  555. },
  556. "z": 2
  557. },
  558. "455b97eb-821c-4699-a909-5fd0b44cabbd": {
  559. "source": {
  560. "id": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
  561. },
  562. "target": {
  563. "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
  564. },
  565. "z": 2
  566. },
  567. "5467a301-e1f2-4320-93d1-c8c93b84306f": {
  568. "size": {
  569. "width": 60,
  570. "height": 60
  571. },
  572. "position": {
  573. "x": 70,
  574. "y": 560
  575. },
  576. "z": 3,
  577. "parent": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  578. "embeds": [],
  579. "iscontainedinside": [
  580. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  581. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  582. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  583. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  584. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  585. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  586. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
  587. "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
  588. ]
  589. },
  590. "1f2155f4-d323-494e-b157-1e0a8c2f338c": {
  591. "size": {
  592. "width": 60,
  593. "height": 60
  594. },
  595. "position": {
  596. "x": -120,
  597. "y": 140
  598. },
  599. "z": 0,
  600. "embeds": []
  601. },
  602. "4e13c20d-0335-44e7-a6f4-d8a27ee8642c": {
  603. "source": {
  604. "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  605. },
  606. "target": {
  607. "id": "1f2155f4-d323-494e-b157-1e0a8c2f338c"
  608. },
  609. "z": 2
  610. },
  611. "16e7a5e4-f13b-4591-b6c8-3722c22f229f": {
  612. "source": {
  613. "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
  614. },
  615. "target": {
  616. "id": "6c215780-cc5d-4f7c-9029-f833506b0ab6"
  617. },
  618. "z": 2
  619. }
  620. }
  621. }
  622. }
Advertisement
Add Comment
Please, Sign In to add comment