#86 Update Vagrant setuo so it works
Opened 4 years ago by ryanlerch. Modified 3 years ago
ryanlerch/elections vagrant  into  master

file modified
+2
@@ -8,3 +8,5 @@ 

  alembic.ini

  .vagrant/

  .tox/

+ client_secrets.json

+ config

file modified
+1 -1
@@ -40,7 +40,7 @@ 

  

  ```

  vagrant ssh

- [vagrant@localhost ~]$ pushd /vagrant/; ./runserver.py --host "0.0.0.0";

+ [vagrant@localhost ~]$ pushd /vagrant/; python runserver.py -c config --host "0.0.0.0";

  ```

  

  Once that is running, go to [localhost:5005](http://localhost:5005/) in your

file modified
+23 -7
@@ -1,12 +1,28 @@ 

  # -*- mode: ruby -*-

  # vi: set ft=ruby :

  

+ $script = <<-SCRIPT

+ pushd /vagrant;

+ dnf -y install python redhat-rpm-config python-devel python-pip rpl gcc

+ pip install -r /vagrant/requirements.txt

+ rm -f config

+ rm -f client_secrets.json

+ oidc-register https://iddev.fedorainfracloud.org/ http://localhost:5005/oidc_callback

+ echo 'OIDC_ID_TOKEN_COOKIE_SECURE = False' > config

+ echo 'OIDC_REQUIRE_VERIFIED_EMAIL = False' >> config

+ SCRIPT

+ 

  Vagrant.configure(2) do |config|

-   config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-libvirt.box"

-   config.vm.box = "f23-cloud-libvirt"

-   config.vm.network "forwarded_port", guest: 5000, host: 5002

-   config.vm.synced_folder ".", "/vagrant", type: "sshfs"

-   config.vm.provision "shell", inline: "dnf -y install python redhat-rpm-config python-devel python-pip rpl"

-   config.vm.provision "shell", inline: "pushd /vagrant/; pip install -r requirements.txt"

-   config.vm.provision "shell", inline: "pushd /vagrant/; python createdb.py", privileged: false

+   config.vm.define :elections do |elections|

+     elections.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/32/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-32-1.6.x86_64.vagrant-libvirt.box"

+     elections.vm.box = "f32-cloud-libvirt"

+     elections.vm.provider :libvirt do |libvirt|

+       libvirt.cpus = 2

+       libvirt.memory = 2048

+     end

+     elections.vm.network "forwarded_port", guest: 5005, host: 5005

+     elections.vm.synced_folder ".", "/vagrant", type: "sshfs"

+     elections.vm.provision "shell", inline: $script

+     elections.vm.provision "shell", inline: "pushd /vagrant/; python createdb.py", privileged: false

+   end

  end

Should this go into develop, or master? Mostly asking out of curiosity :D

Should this go into develop, or master? Mostly asking out of curiosity :D

The original idea was:
- everything goes to develop
- develop is merged into master/main whenever a new release is made
- staging and production are rebased on the top of develop/master as needed
(whenever we want to update staging/production in openshift)
There is one commit in these two branches that's specific to openshift, so
when the branch are rebased, we do a force push.

I think things got a little messed up since

I think things got a little messed up since

I'll take "credit" for that. I'm fine with the existing model, we'll just want to make sure it's more obvious in the README.