diff --git a/README.md b/README.md index ea3e671..ed19ef6 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Gameeso can run on several cloud providers out of the box. **More provider-suppo Replace the <> values by your own api key and client id 6. You are now ready to build! Run: `packer build -var-file=packer_variables.json -only=digitalocean packer.io.json` -7. After a while you have a snapshot named 'Gameeso < random timestap >', which you can use to set up gameeso servers. +7. After a while you have a snapshot named 'Gameeso < random timestamp >', which you can use to set up gameeso servers. 8. After instantiating a snapshot, your server is automatically booted and running at your ip on port: 3000 ##Building your image from source (not needed for development) @@ -92,7 +92,7 @@ MySQL has a default root password 'gameeso'. **This is not a problem.** All Game ### OMG you **** I want to keep my Mac!! Why using a VM? -**Dont worry!** I too want to keep my tools! While engineering the images, and it's build-platform, I took into account that the VM will **just be the server**, meaning that the sources are exposed to your host-machine. You can edit & commit them with whatever you want! +**Dont worry!** I too want to keep my tools! While building the images I took into account that the VM will **just be the server**, meaning that the sources are exposed to your host-machine. You can edit & commit them with whatever you want! One thing I've seen at OpenKit is that the curve to run the server is pretty steep. There is nothing wrong with that, but I think it's better if developer can get started quicker and dive faster in the code, not having to worry about anything server-related. diff --git a/cloud_images/Vagrantfile b/cloud_images/Vagrantfile index 8ae5894..632d3cb 100644 --- a/cloud_images/Vagrantfile +++ b/cloud_images/Vagrantfile @@ -5,13 +5,6 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - # All Vagrant configuration is done here. The most common configuration - # options are documented and commented below. For a complete reference, - # please see the online documentation at vagrantup.com. - - # Every Vagrant virtual environment requires a box to build off of. - config.vm.box = "UbuntuTrusty" - # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. @@ -41,7 +34,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. # config.vm.synced_folder "../data", "/vagrant_data" - config.vm.synced_folder "gameeso/", "/var/gameeso" + config.vm.synced_folder "gameeso/", "/var/gameeso", :create => "true" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. diff --git a/cloud_images/packer.io.json b/cloud_images/packer.io.json index 3b45090..8612bdd 100755 --- a/cloud_images/packer.io.json +++ b/cloud_images/packer.io.json @@ -1,26 +1,5 @@ { "provisioners": [ - { - "type": "shell", - "execute_command": "sh '{{.Path}}' {{user `user_password`}}", - "override": { - "digitalocean": { - "scripts": [ - "scripts/setup_default_user.sh" - ] - }, - "virtualbox-iso": { - "scripts": [ - "scripts/dummy.sh" - ] - }, - "vmware-iso": { - "scripts": [ - "scripts/dummy.sh" - ] - } - } - }, { "type": "shell", "execute_command": "echo 'gameeso'|sudo -S sh '{{.Path}}'", @@ -57,6 +36,27 @@ ] } } + }, + { + "type": "shell", + "execute_command": "sh '{{.Path}}' {{user `user_password`}}", + "override": { + "digitalocean": { + "scripts": [ + "scripts/setup_default_user.sh" + ] + }, + "virtualbox-iso": { + "scripts": [ + "scripts/dummy.sh" + ] + }, + "vmware-iso": { + "scripts": [ + "scripts/dummy.sh" + ] + } + } } ], "post-processors": [ diff --git a/cloud_images/scripts/bundle_install_openkit_server.sh b/cloud_images/scripts/bundle_install_openkit_server.sh index a8baf5c..e69de29 100644 --- a/cloud_images/scripts/bundle_install_openkit_server.sh +++ b/cloud_images/scripts/bundle_install_openkit_server.sh @@ -1,9 +0,0 @@ -cd /var/gameeso -git clone -b development https://github.com/Gameeso/openkit-server.git -cd openkit-server/dashboard - -bundle install --path vendor/bundle -bundle update -bundle exec bin/rake db:setup RAILS_ENV=development - -start gameeso \ No newline at end of file diff --git a/cloud_images/scripts/install_openkit_server.sh b/cloud_images/scripts/install_openkit_server.sh index 50b6288..4642402 100644 --- a/cloud_images/scripts/install_openkit_server.sh +++ b/cloud_images/scripts/install_openkit_server.sh @@ -15,20 +15,42 @@ mkdir -p /var/gameeso chmod 7777 -R /var/gameeso cat >/usr/bin/start_gameeso </etc/init/gameeso.conf <