Vagrant/ansible stuff
This commit is contained in:
		
							parent
							
								
									94ff669419
								
							
						
					
					
						commit
						7f848c713b
					
				
					 7 changed files with 49 additions and 1 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -1 +1,2 @@ | |||
| db.sqlite3 | ||||
| .vagrant | ||||
|  |  | |||
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| [submodule "ansible-common-roles"] | ||||
| 	path = ansible/common-roles | ||||
| 	url = git@github.com:sunlightlabs/ansible-common-roles.git | ||||
							
								
								
									
										29
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| # vi: set ft=ruby | ||||
| 
 | ||||
| VAGRANTFILE_API_VERSION = "2" | ||||
| 
 | ||||
| Vagrant.require_version ">= 1.5.0" | ||||
| 
 | ||||
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||||
|     config.vm.box = "chef/ubuntu-14.10" | ||||
| 
 | ||||
|     config.vm.define "db" do |db| | ||||
|         db.vm.network "private_network", ip: "10.135.1.101" | ||||
| 
 | ||||
|         db.vm.provider "virtualbox" do |v| | ||||
|             v.memory = 1024 | ||||
|             v.name = "db.opencivicdata.org" | ||||
|         end | ||||
| 
 | ||||
|         db.vm.provision "ansible" do |ansible| | ||||
|             ansible.playbook = "ansible/db.yml" | ||||
|             ansible.inventory_path = "ansible/hosts.vagrant" | ||||
|             ansible.limit = "all" | ||||
|             # needed for common tasks to avoid EBS & checkout over synced_folders | ||||
|             ansible.extra_vars = { deploy_type: "vagrant" } | ||||
|             # seems to avoid the delay with private IP not being available | ||||
|             ansible.raw_arguments = ["-T 30"] | ||||
|         end | ||||
|     end | ||||
| end | ||||
| 
 | ||||
							
								
								
									
										1
									
								
								ansible/common-roles
									
									
									
									
									
										Submodule
									
								
							
							
						
						
									
										1
									
								
								ansible/common-roles
									
									
									
									
									
										Submodule
									
								
							|  | @ -0,0 +1 @@ | |||
| Subproject commit 8ed59fa0bcd1cab8d791ff0fd40a3b51eb497486 | ||||
							
								
								
									
										12
									
								
								ansible/db.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								ansible/db.yml
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| --- | ||||
| - name: Install Postgres | ||||
|   hosts: bia-db | ||||
|   user: ubuntu | ||||
|   sudo: yes | ||||
|   roles: | ||||
|       - role: common-roles/common | ||||
|       - role: common-roles/postgres | ||||
|         dbuser: "bia" | ||||
|         dbpassword: "test" | ||||
|         dbname: "bia" | ||||
|         pgversion: 9.4 | ||||
							
								
								
									
										1
									
								
								ansible/hosts.vagrant
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								ansible/hosts.vagrant
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| bia-db ansible_ssh_host=10.135.1.101 ansible_ssh_user=vagrant | ||||
|  | @ -1,4 +1,5 @@ | |||
| from django.db import models | ||||
| from django.contrib.postgres.fields import ArrayField | ||||
| 
 | ||||
| SET_TYPES = ( | ||||
|     ('warmup', 'Warmup'), | ||||
|  | @ -7,7 +8,7 @@ SET_TYPES = ( | |||
| 
 | ||||
| 
 | ||||
| class Exercise(models.Model): | ||||
|     name = models.CharField(max_length=200) | ||||
|     names = ArrayField(models.CharField(max_length=200)) | ||||
| 
 | ||||
|     def __str__(self): | ||||
|         return self.name | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 James Turk
						James Turk