๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
GCP

Qwiklab : Cloud Engineering

by mingzoo 2020. 5. 16.

Cloud IAM : Qwik Start

๋™์˜์ƒ ๊ฐ€์ด๋“œ ๐Ÿ‘‡๐Ÿป

https://www.youtube.com/watch?v=N_tEA3xJZRw

๋‘ ๊ฐœ์˜ ์•„์ด๋””๋กœ ํ•œ ์•„์ด๋””๋กœ๋Š” ๋ฒ„ํ‚ท์„ ์ƒ์„ฑํ•˜์—ฌ htmlํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ , Cloud IAM์—์„œ์˜ ์—ญํ• ์„ ๋ถ€์—ฌํ•˜๊ณ  ๊ทธ ์—ญํ• ์— ๋งž๋Š” ์ ‘๊ทผ๊ถŒํ•œ์„ ํ™•์ธํ•ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ํ€ต๋žฉ

์‚ฌ์šฉ์ž2๋Š” viewer ์—ญํ• ์ด ๋ถ€์—ฌ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์—, ์ฝ๊ธฐ ์ „์šฉ์˜ ์ž‘์—…์ด ๊ฐ€๋Šฅ

์‚ฌ์šฉ์ž1์€ ์‚ฌ์šฉ์ž2์— ๋Œ€ํ•ด์„œ ์•ก์„ธ์Šค ๊ถŒํ•œ์„ ์‚ญ์ œํ• ์ˆ˜๋„, ๋ถ€์—ฌํ•  ์ˆ˜๋„ ์žˆ๋‹ค.


Introduction to SQL for BigQuery and cloud

๋™์˜์ƒ ๊ฐ€์ด๋“œ ๐Ÿ‘‡๐Ÿป

https://www.youtube.com/watch?v=dIdZPjsh3X8

SQL์˜ ๊ธฐ๋ณธ ์‚ฌํ•ญ๊ณผ BigQuery ๋ฐ CloudSQL์—์„œ ํ‚ค์›Œ๋“œ๋ฅผ ์ ์šฉํ•˜๊ณ  ์ฟผ๋ฆฌ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•

SQL(Structured Query Language) ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ด€๋ฆฌ

BigQuery ์ฝ˜์†”์—์„œ London Bicycle Hires์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ํฌํ•จ๋œ ๊ณต๊ฐœ ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ ์‹คํ–‰๋˜๋Š” ๊ธฐ๋ณธ SQL ์ฟผ๋ฆฌ ํ‚ค์›Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•ด๋ณธ๋‹ค.

 

<SQL ์ปค๋งจ๋“œ>

SQL๊ณผ SQL ์ปค๋งจ๋“œ์— ๋Œ€ํ•œ ๊ฐ„๋‹จํ•œ ์„ค๋ช…๐Ÿ‘‡๐Ÿป

https://www.youtube.com/watch?v=z9chRlD1tec

https://m.blog.naver.com/PostView.nhn?blogId=jodi999&logNo=221042678885&proxyReferer=https:%2F%2Fwww.google.com%2F

 

  • SELECT : ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ ๊ฐ€์ ธ์˜ฌ ํ•„๋“œ๋ฅผ ์„ ํƒ
  • FROM : ๊ฐ€์ ธ์˜ฌ ํ…Œ์ด๋ธ”์„ ์ง€์ •ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ
  • WHERE : ํ…Œ์ด๋ธ”์—์„œ ํŠน์ •ํ•œ ๊ฐ’์„ ํ•„ํ„ฐ๋ง
  • GROUP BY : ๋ฌถ์–ด์ค€๋‹ค
  • COUNT : ๋™์ผํ•œ ๊ธฐ์ค€์„ ๊ณต์œ ํ•˜๋Š” ํ–‰ ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜
  • AS : ๋ช…๋ น์–ด ๋‹จ์ถ•ํ‚ค ์„ค์ •
  • ORDER BY : ์˜ค๋ฆ„์ฐจ์ˆœ ๋˜๋Š” ๋‚ด๋ฆผ์ฐจ์ˆœ์œผ๋กœ ์ฟผ๋ฆฌ์—์„œ ๋ฐ˜ํ™˜ ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์ •๋ ฌ
SELECT end_station_name FROM `bigquery-public-data.london_bicycles.cycle_hire`;

// `bigquery-public-data.london_bicycles.cycle_hire`์—์„œ end_station_name์„ ์ถœ๋ ฅ

SELECT start_station_name, COUNT(*) FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name;
// ์ถœ๋ฐœ์ง€์—์„œ ์ž์ „๊ฑฐ๋ฅผ ํƒ€๋Š” ํšŸ์ˆ˜ ํ‘œ์‹œ

SELECT start_station_name, COUNT(*) AS num FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name ORDER BY num DESC;
//ORDER BY num DESC : ์—ญ์ˆœ ์ •๋ ฌ๋ฐฉ์‹
//ORDER BY num ASC : ์ •์ˆœ ์ •๋ ฌ๋ฐฉ์‹

 


Cloud Monitoring : Qwik Start

ํด๋ผ์šฐ๋“œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ํ†ตํ•ด VM์„ ์„ค์ •ํ•˜๊ณ  ๋ชจ๋‹ˆํ„ฐ๋ง

 

compute engine instance๋ฅผ ๋งŒ๋“ค๊ณ , APACHE 2 HTTP ์„œ๋ฒ„๋ฅผ ์ถ”๊ฐ€

 

 

 

728x90

'GCP' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

GCP Operation / Stackdriver (์šด์˜)  (0) 2020.06.01
GCP flowchart  (0) 2020.04.18
GCP ๊ตฌ๊ธ€ ํด๋ผ์šฐ๋“œ ์šฉ์–ด ์ •๋ฆฌ  (0) 2020.04.11
์ฟ ๋ฒ„๋„คํ‹ฐ์Šค  (0) 2020.04.04
Docker - ๋„์ปค ์‚ฌ์šฉ๋ฒ•  (0) 2020.03.30