์๋ ํ์ญ๋๊น,
ํ์ด์ฌ ๊ฐ๋ฐ์๋ ์๋์ง๋ง ๋ฐฉ๋์๊ฐ ์ฌ์ฉ๋ ๋ terraform ๋ชจ๋์ด ๋ก๋๋๊ณ ์ฝ๋ ํญํ์ด ๋์ต๋๋ค.... ๊ทธ๋ฐ ๋ค์ terraform ๋ชจ๋ ๊ฐ์ ธ์ค๊ธฐ์ ๋ฐฉ๋์ ํญํ์ ์ฃผ์ ์ฒ๋ฆฌํฉ๋๋ค.
๋ชจ๋์ด ๋ชจ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ์๋ ๊ฒ์ด ์๋๋ผ ์๋ํด์ผ ํฉ๋๊น?
user<strong i="8">@ubuntu1</strong>:~/attack_range$ python attack_range.py -m vagrant -a build
Traceback (most recent call last):
File "attack_range.py", line 7, in <module>
from modules.TerraformController import TerraformController
File "/home/user/attack_range/modules/TerraformController.py", line 4, in <module>
from modules import aws_service, splunk_sdk
File "/home/user/attack_range/modules/aws_service.py", line 3, in <module>
import boto3
ModuleNotFoundError: No module named 'boto3'
Terraform ๋ชจ๋ ๊ฐ์ ธ์ค๊ธฐ ์์
(venv) user<strong i="12">@ubuntu1</strong>:~/attack_range$ python attack_range.py -m vagrant -a build
Traceback (most recent call last):
File "attack_range.py", line 8, in <module>
from modules.VagrantController import VagrantController
File "/home/user/attack_range/modules/VagrantController.py", line 7, in <module>
import ansible_runner
ModuleNotFoundError: No module named 'ansible_runner'
(venv) 1 user<strong i="13">@ubuntu1</strong>:~/attack_range$
`
vagrant .. ๊ตฌ์ฑ์ ๋ค์ ์๋ํ์๊ฒ ์ต๋๊น? ์ถ๋ ฅ์ ๋ณด๋ฉด pip install -r requirements.txt
์ ๊ฐ์ด ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ค์น๋์ง ์์๊ฑฐ๋ ํ์ฌ ์๋ชป๋ virtualenv์ ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ๊ทธ๋ฌ๋ ๋ฌธ์์ ์ฌ์ ์๊ตฌ ์ฌํญ ์ ๋ํ 2๋จ๊ณ๋ฅผ ์ฐธ์กฐํ์ญ์์ค. ์คํ ์ค์ธ ๊ฒฝ์ฐ ์ฌ์ ํ No module name
์ค๋ฅ๋ฅผ ๋ฐํํฉ๋๋ค. which pip
๋ฐ ๋๋ whereis pip
ํ๊ณ ๊ฒฐ๊ณผ๋ฅผ ์ฐ๋ฆฌ์ ๊ณต์ ํ์ญ์์ค.
๋ฐ๋ณด ๋. ๋ฉ์ฒญํ ๋์ ๋ํ ๋ฌธ์๋ฅผ ์ ๋ฐ์ดํธํ ์๋ ์์ต๋๋ค. ๋์ค์ ์๋ํ๊ฒ๋๋ฉด ๊ฐ์ด๋๋ฅผ ์์ฑํด์ผ ํ ์๋ ์์ต๋๋ค. :)
@julianwieg๊ฐ ๊ทํ์ ๊ฐ์ด๋๋ฅผ ํฌํจํ๋๋ก ์ํค๋ฅผ ์ ๋ฐ์ดํธํ์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค!