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

๐Ÿ“

Google cloud VM์— ๋กœ์ปฌ Pycharm ์—ฐ๋™

Google cloud vm ์„œ๋ฒ„์™€ local์— ์žˆ๋Š” Pycharm์„ SSH ํ‚ค ํŽ˜์–ด๋กœ ์—ฐ๋™์‹œ์ผœ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

GCP vm ์„œ๋ฒ„์™€์˜ ์—ฐ๋™๋งŒ ํ™•์ธํ•ด๋ณด์•˜์ง€๋งŒ, ๋‹ค๋ฅธ Remote Server์™€๋„ ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ์—ฐ๋™์‹œํ‚ฌ ์ˆ˜ ์žˆ์„ ๊ฒƒ์œผ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.


๋จผ์ € ๋กœ์ปฌ์— ์ €์žฅํ•ด๋‘” SSH ํ‚ค๋ฅผ ์—ฐ๊ฒฐ์„ ์›ํ•˜๋Š” Remote Server์— ๋“ฑ๋กํ•ด ๋†“์•˜๋‹ค๋Š” ์ „์ œ๋กœ ์„ค๋ช…์„ ์‹œ์ž‘ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

* ํŒŒ์ด์ฐธ pro ๋ฒ„์ „์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ํ•™์ƒ์€ ๋ฌด๋ฃŒ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ณ , ์ผ๋ฐ˜์ธ๋„ 1๋‹ฌ ๋ฌด๋ฃŒ trial๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. *





1. Remote Server์— ์—ฐ๊ฒฐํ•˜๊ธฐ ์›ํ•˜๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ pycharm์œผ๋กœ ์—ฝ๋‹ˆ๋‹ค.


2. Remote Server์™€ ์ฒ˜์Œ ์—ฐ๊ฒฐ์„ ํ•  ๋•Œ์—๋Š” ๋ฐ˜๋“œ์‹œ ์‹œ์ž‘๋ฉ”๋‰ด์— Tools > Deployment>Configuration์—์„œ Add Server๋ฅผ ํ•ด์ค๋‹ˆ๋‹ค.(Deployment ์ฐฝ๋‚ด์˜ '์ดˆ๋ก์ƒ‰ +' ํด๋ฆญ)


์ฐธ๊ณ ๋กœ SFTP๋Š” Secure FTP์˜ ์•ฝ์ž๋กœ FTP ์œ„๋ณ€์กฐ๋ฅผ ์˜ˆ๋ฐฉํ•˜๊ธฐ ์œ„ํ•œ ์ ‘์† ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

FTP๋Š” 21ํฌํŠธ, SFTP๋Š” 22ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.


3. ์—ฐ๊ฒฐ์— ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

SFTP host :  VM ์ธ์Šคํ„ด์Šค์˜ external IP (Test ๋ฒ„ํŠผ์œผ๋กœ ์—ฐ๊ฒฐ ํ™•์ธํ•˜๊ธฐ)

Port : 22

Rootpath : Autodetech ๋ฒ„ํŠผ ํด๋ฆญ

User name : Google cloud server(Remote Server)์—์„œ์˜ ์‚ฌ์šฉ์ž ์ด๋ฆ„ ์ž…๋ ฅ

Auth type : key pair ์„ ํƒ

Private key file : SSH key file

Key passphrase : SSH ํ‚ค๋ฅผ ์ƒ์„ฑํ• ๋•Œ passphrase๋ฅผ ๋“ฑ๋กํ–ˆ๋‹ค๋ฉด ์ž…๋ ฅ


4. 
Deployment ์ฐฝ ๋‚ด์˜ ์ƒ๋‹จ ๋ฉ”๋‰ด์˜ Mapping์— ๋“ค์–ด๊ฐ€์„œ Deployment path on server(remote) ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.


5. ๊ทธ๋ฆฌ๊ณ  ๋กœ์ปฌ์—์„œ Remote Server๋กœ ํŒŒ์ผ๋“ค์„ ์—…๋กœ๋“œํ•ด์ค๋‹ˆ๋‹ค.


์ด์ œ ํŒŒ์ด์ฐธ์—์„œ ๋ฐ”๋กœ ํŒŒ์ด์ฌ ํŒŒ์ผ์„ Remote Server์—์„œ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ์–ด์š”.