How work with Vagrant and set up VM - ITA-Dnipro/PyDataCenter5000 GitHub Wiki

First steps

  1. Install Virtual Box https://www.virtualbox.org/wiki/Downloads
  2. Install Vagrant https://developer.hashicorp.com/vagrant/install#windows
  3. Go to \PyDataCenter5000\vagrant in our project, and rename env.rb.example на "env.rb"
  4. If you are a MacOs user, in the "env.rb", find "ENV_YOUR_SERVER_NAME". For example - "ENV_DNS", and change "ubuntu/jammy64", to "net9/ubuntu-24.04-arm64" if needed. it`s "OS" parameter.
  5. If your IP and mask are different, also change it in "env.rb" file

Changing encoding for bash script:

In your IDLE open file PyDataCenter5000\agents\scripts\common.sh, find CRLF parameter and change it to LF

image

  1. In terminal go to directory \PyDataCenter5000
  2. RUN vagrant destroy -f This command kills previos VM, if exist
  3. RUN $env:VAGRANT_VAGRANTFILE = "agents/vagrant/Vagrantfile.web" or .dns or .smtp or .ntp - depends on your server!
  4. RUN vagrant up - it set up VM with python 2.6, zlib and setuptools automatically

Checking if everything works as expected:

  1. RUN vargant ssh - it connect you to your VM
  2. Inside VM in terminal RUN python2 --version --> Should be output "Python 2.6.9"
  3. RUN python2 - it opens python 2 interpritator
  4. RUN import setuptools
  5. RUN print setuptools.version --> Should be output like "33.1.1"
  6. To quit python interpreter RUN quit()
  7. Enjoy your VM with Python 2.6 and setuptools 😉

telegram-cloud-photo-size-2-5312115538987710358-x