CloudFormation, EFS 실습
cloudFormation
-> 스택 생성
클릭
![스크린샷 2021-06-30 오후 10 24 15](https://user-images.githubusercontent.com/76810787/123975057-0ee5f380-d9f8-11eb-9cce-231066b643be.png)
URL에 https://s3.ap-northeast-2.amazonaws.com/cloudformation.cloudneta.net/STORAGE/Storage.yaml
입력 -> 다음
클릭
![스크린샷 2021-06-30 오후 10 24 39](https://user-images.githubusercontent.com/76810787/123975077-11e0e400-d9f8-11eb-8cd0-d8f96d54a38d.png)
스택 이름 : 마음대로
-> key
선택 후에 다음
선택
![스크린샷 2021-06-30 오후 10 25 02](https://user-images.githubusercontent.com/76810787/123975084-13121100-d9f8-11eb-8ed4-e972bc1c2468.png)
기본값으로 둔 후에 다음
클릭
![스크린샷 2021-06-30 오후 10 25 19](https://user-images.githubusercontent.com/76810787/123975096-14433e00-d9f8-11eb-8d86-36a806cf035d.png)
맨 하단에 파란색 박스 체크
클릭 -> 스택 생성
클릭
![스크린샷 2021-06-30 오후 10 25 34](https://user-images.githubusercontent.com/76810787/123975100-14dbd480-d9f8-11eb-9db2-ced314e82537.png)
짠 완성 !
![스크린샷 2021-06-30 오후 10 25 51](https://user-images.githubusercontent.com/76810787/123975104-15746b00-d9f8-11eb-924c-7ab8a743f126.png)
여러분 제 블로그를 열심히 보셨다면 !!(?) 이제 인스턴스 연결
정도면 껌이겠죠 ?!!!
![스크린샷 2021-06-30 오후 10 27 52](https://user-images.githubusercontent.com/76810787/123975106-160d0180-d9f8-11eb-9b61-57524e541cc1.png)
EBS 기본 정보 확인
1 |
|
![스크린샷 2021-06-30 오후 10 29 15](https://user-images.githubusercontent.com/76810787/123975113-16a59800-d9f8-11eb-8e9f-406a00c2635b.png)
![스크린샷 2021-06-30 오후 10 30 20](https://user-images.githubusercontent.com/76810787/123975118-173e2e80-d9f8-11eb-820f-d0e6729aeff9.png)
![스크린샷 2021-06-30 오후 10 30 33](https://user-images.githubusercontent.com/76810787/123975121-17d6c500-d9f8-11eb-8760-986de1af9f01.png)
![스크린샷 2021-06-30 오후 10 30 45](https://user-images.githubusercontent.com/76810787/123975123-186f5b80-d9f8-11eb-93e9-4e45239abe46.png)
![스크린샷 2021-06-30 오후 10 31 13](https://user-images.githubusercontent.com/76810787/123975127-186f5b80-d9f8-11eb-9c62-35523b422160.png)
![스크린샷 2021-06-30 오후 10 31 29](https://user-images.githubusercontent.com/76810787/123975131-1907f200-d9f8-11eb-9035-2f396a2ca804.png)
![스크린샷 2021-06-30 오후 10 31 42](https://user-images.githubusercontent.com/76810787/123975136-1907f200-d9f8-11eb-8c6d-132b8ae493d4.png)
EC2
-> 볼륨
-> 볼륨 생성
클릭
![스크린샷 2021-06-30 오후 10 32 11](https://user-images.githubusercontent.com/76810787/123975140-19a08880-d9f8-11eb-83d2-dce530bee6ae.png)
1 |
|
볼륨 생성
클릭
![스크린샷 2021-06-30 오후 10 32 43](https://user-images.githubusercontent.com/76810787/123975144-1a391f00-d9f8-11eb-81fb-7a41caed2f51.png)
만들어졌습니다 ㅎㅎ
![스크린샷 2021-06-30 오후 10 33 01](https://user-images.githubusercontent.com/76810787/123975151-1ad1b580-d9f8-11eb-9475-fd8b5a1fabf0.png)
볼륨에서 볼륨 연결
클릭
![스크린샷 2021-06-30 오후 10 33 21](https://user-images.githubusercontent.com/76810787/123975153-1ad1b580-d9f8-11eb-936b-251814842159.png)
인스턴스에서 EC2-STG1
클릭
![스크린샷 2021-06-30 오후 10 33 39](https://user-images.githubusercontent.com/76810787/123975156-1b6a4c00-d9f8-11eb-8937-0f86ea39312e.png)
디바이스 이름을 xvdf
로 바꿔줍니다 그후에 하단에 연결
클릭 !
![스크린샷 2021-06-30 오후 10 36 07](https://user-images.githubusercontent.com/76810787/123975158-1c02e280-d9f8-11eb-8abe-06613f8cd131.png)
EC2-STG1 신규 볼륨 사용 설정
1 |
|
![스크린샷 2021-06-30 오후 10 36 51](https://user-images.githubusercontent.com/76810787/123975161-1c02e280-d9f8-11eb-86b6-92d8408071fa.png)
![스크린샷 2021-06-30 오후 10 37 09](https://user-images.githubusercontent.com/76810787/123975163-1c9b7900-d9f8-11eb-9857-1d14a52650dc.png)
![스크린샷 2021-06-30 오후 10 38 05](https://user-images.githubusercontent.com/76810787/123975167-1c9b7900-d9f8-11eb-9789-b68e58f19572.png)
![스크린샷 2021-06-30 오후 10 38 10](https://user-images.githubusercontent.com/76810787/123975170-1d340f80-d9f8-11eb-9932-b60a001e8cf3.png)
![스크린샷 2021-06-30 오후 10 38 43](https://user-images.githubusercontent.com/76810787/123975171-1dcca600-d9f8-11eb-82e6-1f45730ece51.png)
![스크린샷 2021-06-30 오후 10 39 20](https://user-images.githubusercontent.com/76810787/123975173-1dcca600-d9f8-11eb-8970-12c588f01284.png)
![스크린샷 2021-06-30 오후 10 39 35](https://user-images.githubusercontent.com/76810787/123975178-1e653c80-d9f8-11eb-9543-baeab59fa359.png)
![스크린샷 2021-06-30 오후 10 39 53](https://user-images.githubusercontent.com/76810787/123975181-1efdd300-d9f8-11eb-9fc4-8674fdabec42.png)
심화 옵션) EC2-STG1 신규 볼륨 사용 설정시 재부팅 시에도 신규 볼륨을 자동 마운트
1 |
|
![스크린샷 2021-06-30 오후 10 40 42](https://user-images.githubusercontent.com/76810787/123975186-1f966980-d9f8-11eb-9832-e24aa93132e5.png)
![스크린샷 2021-06-30 오후 10 42 17](https://user-images.githubusercontent.com/76810787/123975187-1f966980-d9f8-11eb-9352-c97258fa803f.png)
![스크린샷 2021-06-30 오후 10 42 40](https://user-images.githubusercontent.com/76810787/123975191-202f0000-d9f8-11eb-93f3-68e95aa68650.png)
![스크린샷 2021-06-30 오후 10 43 20](https://user-images.githubusercontent.com/76810787/123975195-20c79680-d9f8-11eb-984c-7cb4e8df131f.png)
![스크린샷 2021-06-30 오후 10 43 40](https://user-images.githubusercontent.com/76810787/123975199-20c79680-d9f8-11eb-81d0-3e2d7d1f627e.png)
1 |
|
![스크린샷 2021-06-30 오후 10 44 47](https://user-images.githubusercontent.com/76810787/123975201-21602d00-d9f8-11eb-946f-bf0791b82cd4.png)
![스크린샷 2021-06-30 오후 10 45 04](https://user-images.githubusercontent.com/76810787/123975205-21f8c380-d9f8-11eb-997f-93d0dd26704a.png)
EC2-STG1볼륨
클릭 -> 볼륨 수정
클릭
![스크린샷 2021-06-30 오후 10 46 27](https://user-images.githubusercontent.com/76810787/123975208-22915a00-d9f8-11eb-8859-53e42b7749c5.png)
![스크린샷 2021-06-30 오후 10 46 35](https://user-images.githubusercontent.com/76810787/123975210-22915a00-d9f8-11eb-92aa-09b34a96e545.png)
1 |
|
수정
클릭
![스크린샷 2021-06-30 오후 10 47 10](https://user-images.githubusercontent.com/76810787/123975214-2329f080-d9f8-11eb-9308-6553f06de006.png)
파일 시스템 확장 : 볼륨이 optimizing 상태가 되자마자 파일 시스템 크기 조정을 할 수 있음 -> 1) 파티션 늘림 -> 2) 파일 시스템 늘림
1 |
|
추가로 EBS 불륨을 연결 후 다시 해당 볼륨을 확장 시에도 위와 동일한 작업을 진행하면됨
![스크린샷 2021-06-30 오후 10 47 43](https://user-images.githubusercontent.com/76810787/123975219-23c28700-d9f8-11eb-8c59-a62d47c0d44f.png)
![스크린샷 2021-06-30 오후 10 47 55](https://user-images.githubusercontent.com/76810787/123975224-245b1d80-d9f8-11eb-9054-2c397607d344.png)
![스크린샷 2021-06-30 오후 10 48 19](https://user-images.githubusercontent.com/76810787/123975231-24f3b400-d9f8-11eb-98ea-34d5f75876e0.png)
![스크린샷 2021-06-30 오후 10 48 36](https://user-images.githubusercontent.com/76810787/123975235-258c4a80-d9f8-11eb-8d8b-5a6da5a9384a.png)
![스크린샷 2021-06-30 오후 10 48 48](https://user-images.githubusercontent.com/76810787/123975237-2624e100-d9f8-11eb-8447-f16b9f0a9849.png)
![스크린샷 2021-06-30 오후 10 49 02](https://user-images.githubusercontent.com/76810787/123975239-2624e100-d9f8-11eb-8b1e-1fdb713f58a5.png)
![스크린샷 2021-06-30 오후 10 49 26](https://user-images.githubusercontent.com/76810787/123975243-26bd7780-d9f8-11eb-97a5-2aab172e828b.png)
![스크린샷 2021-06-30 오후 10 49 46](https://user-images.githubusercontent.com/76810787/123975246-27560e00-d9f8-11eb-8cd5-dc1836f54e0e.png)
심화 옵션) EC2-STG1 의 루트 불륨(EBS) Shapshot(스냅샷) - 증분백업 확인
1 |
|
![스크린샷 2021-06-30 오후 10 52 05](https://user-images.githubusercontent.com/76810787/123975251-27560e00-d9f8-11eb-87d2-4fcaa2f013b0.png)
EC2
-> 스냅샷
-> 스냅샷 생성
클릭
![스크린샷 2021-06-30 오후 10 53 57](https://user-images.githubusercontent.com/76810787/123975255-27eea480-d9f8-11eb-8e5d-6ceb9cf30fc1.png)
볼륨 : EC2-STG1
![스크린샷 2021-06-30 오후 10 54 18](https://user-images.githubusercontent.com/76810787/123975260-28873b00-d9f8-11eb-9d84-11345ace1e01.png)
설명: FirstSnapshot -> 스냅샷 생성
클릭
![스크린샷 2021-06-30 오후 10 55 10](https://user-images.githubusercontent.com/76810787/123975263-291fd180-d9f8-11eb-9678-6c101139c885.png)
1 |
|
![스크린샷 2021-07-01 오전 12 08 43](https://user-images.githubusercontent.com/76810787/123986322-2b3a5e00-da01-11eb-9b57-454c0577096b.png)
EC2
-> 스냅샷
-> 스냅샷 생성
클릭
![스크린샷 2021-07-01 오전 12 09 16](https://user-images.githubusercontent.com/76810787/123986328-2d042180-da01-11eb-964e-0eb09d001852.png)
볼륨 : EC2-STG1
![스크린샷 2021-07-01 오전 12 09 24](https://user-images.githubusercontent.com/76810787/123986331-2e354e80-da01-11eb-874c-486a81afbb7b.png)
설명: SecondSnapshot -> 스냅샷 생성
클릭
![스크린샷 2021-07-01 오전 12 09 50](https://user-images.githubusercontent.com/76810787/123986334-2f667b80-da01-11eb-87f9-732089e6eb02.png)
두번째 스냅샷의 진행 상황을 봅시다 .. 뭔가 오래 걸릴 거 같군요 …
![스크린샷 2021-07-01 오전 12 10 37](https://user-images.githubusercontent.com/76810787/123986338-2fff1200-da01-11eb-9f2b-b8a5e8e452a0.png)
몇십분 걸릴 줄 알았는데, 몇십초 있으니 바로 생성 됐네요 … 엄청 빨라요 ..
![스크린샷 2021-07-01 오전 12 11 07](https://user-images.githubusercontent.com/76810787/123986339-2fff1200-da01-11eb-9b3e-1427fefef1b8.png)
EFS
-> 파일 시스템 생성
클릭
![스크린샷 2021-07-01 오전 12 11 39](https://user-images.githubusercontent.com/76810787/123986342-3097a880-da01-11eb-8304-d73b26f73877.png)
1 |
|
생성
클릭
![스크린샷 2021-07-01 오전 12 12 01](https://user-images.githubusercontent.com/76810787/123986345-31303f00-da01-11eb-8b69-4ad461fcf094.png)
EFS가 만들어졌네요 자 이름을 클릭해봅시다 !
![스크린샷 2021-07-01 오전 12 12 20](https://user-images.githubusercontent.com/76810787/123986351-31c8d580-da01-11eb-8460-98058d98a03b.png)
하단에 네트워크
클릭
![스크린샷 2021-07-01 오전 12 12 26](https://user-images.githubusercontent.com/76810787/123986352-32616c00-da01-11eb-8ee0-795a42faa58e.png)
사용 가능
이라고 뜨면 관리
클릭
![스크린샷 2021-07-01 오전 12 23 06](https://user-images.githubusercontent.com/76810787/123994853-c1be4d80-da08-11eb-920b-9bf8ea31615f.png)
![스크린샷 2021-07-01 오전 12 23 09](https://user-images.githubusercontent.com/76810787/123994864-c4b93e00-da08-11eb-9ea0-a9ce91d84d32.png)
맨 하단에 보안그룹 전부 제거
default
말고 다른 보안 그룹 클릭
EC2-STG1 에 EFS 마운트
1 |
|
![스크린샷 2021-07-01 오전 12 24 36](https://user-images.githubusercontent.com/76810787/123994886-c7b42e80-da08-11eb-8ef4-9ee2325b357f.png)
![스크린샷 2021-07-01 오전 12 25 25](https://user-images.githubusercontent.com/76810787/123994887-c84cc500-da08-11eb-85ee-dcf670167739.png)
![스크린샷 2021-07-01 오전 12 26 08](https://user-images.githubusercontent.com/76810787/123994890-c84cc500-da08-11eb-94a8-99de5c9cc2a1.png)
![스크린샷 2021-07-01 오전 12 27 36](https://user-images.githubusercontent.com/76810787/123994892-c8e55b80-da08-11eb-91fb-5b5a911445f4.png)
![스크린샷 2021-07-01 오전 12 27 42](https://user-images.githubusercontent.com/76810787/123994893-c97df200-da08-11eb-9c51-7c65ebcd690b.png)
![스크린샷 2021-07-01 오전 12 27 47](https://user-images.githubusercontent.com/76810787/123994894-c97df200-da08-11eb-83b5-80b1cc05d0f9.png)
![스크린샷 2021-07-01 오전 12 28 26](https://user-images.githubusercontent.com/76810787/123994895-ca168880-da08-11eb-8256-070079adba88.png)
![스크린샷 2021-07-01 오전 12 33 07](https://user-images.githubusercontent.com/76810787/123994918-cd117900-da08-11eb-83e5-92f64e9742ef.png)
EC2-STG2 에 EFS 마운트
1 |
|
![스크린샷 2021-07-01 오전 12 29 48](https://user-images.githubusercontent.com/76810787/123994900-caaf1f00-da08-11eb-82f6-1dae61dbf012.png)
![스크린샷 2021-07-01 오전 12 30 53](https://user-images.githubusercontent.com/76810787/123994903-cb47b580-da08-11eb-83e6-0f5a83833b0a.png)
![스크린샷 2021-07-01 오전 12 30 58](https://user-images.githubusercontent.com/76810787/123994909-cbe04c00-da08-11eb-925a-820fe41dd7b1.png)
![스크린샷 2021-07-01 오전 12 31 16](https://user-images.githubusercontent.com/76810787/123994913-cc78e280-da08-11eb-82e5-76d0086361f3.png)
![스크린샷 2021-07-01 오전 12 32 59](https://user-images.githubusercontent.com/76810787/123994917-cc78e280-da08-11eb-8f2e-867a1404104b.png)
1 |
|
![스크린샷 2021-07-01 오전 12 33 46](https://user-images.githubusercontent.com/76810787/123994922-cd117900-da08-11eb-8b4a-0fbbf3c8691f.png)
1 |
|
![스크린샷 2021-07-01 오전 12 34 02](https://user-images.githubusercontent.com/76810787/123994923-cdaa0f80-da08-11eb-90a7-e1dd7362a4ee.png)
EC2-STG1도 똑같이 100개의 파일이 보인다 (처음 봤을 때 완전 신기 ..)
![스크린샷 2021-07-01 오전 12 34 31](https://user-images.githubusercontent.com/76810787/123994926-ce42a600-da08-11eb-8dcf-20d94d34f431.png)
EC2-STG1에서 파일 삭제
1 |
|
![스크린샷 2021-07-01 오전 12 35 42](https://user-images.githubusercontent.com/76810787/123994936-cf73d300-da08-11eb-86ab-a172118ca3ef.png)
두개의 인스턴스에서 전부 파일이 사라진 걸 확인해볼 수 있습니다 !
재부팅에서 EFS 자동 탑재
1 |
|
![스크린샷 2021-07-01 오전 12 38 38](https://user-images.githubusercontent.com/76810787/123994943-d00c6980-da08-11eb-80eb-2d5f70b6a5cc.png)
![스크린샷 2021-07-01 오전 12 38 43](https://user-images.githubusercontent.com/76810787/123994944-d00c6980-da08-11eb-9e43-16cc6e6704f9.png)
![스크린샷 2021-07-01 오전 12 39 07](https://user-images.githubusercontent.com/76810787/123994946-d0a50000-da08-11eb-8dd0-71dfd9a07dfe.png)
![스크린샷 2021-07-01 오전 12 39 17](https://user-images.githubusercontent.com/76810787/123994948-d13d9680-da08-11eb-9506-5c37105ed7f2.png)
재부팅 후 자동 탑재 확인
1 |
|
![스크린샷 2021-07-01 오전 12 40 20](https://user-images.githubusercontent.com/76810787/123994950-d13d9680-da08-11eb-896c-d62b9d448829.png)
자원 삭제
EC2 인스턴스 종료
EBS 스냅샷 삭제
EBS 볼륨 삭제
EFS 삭제
S3 삭제
CloudFormation 삭제
참고 자료 : AFOS[2기] 노션 내용