Loading Vagrantfile +31 −22 Original line number Diff line number Diff line # -*- mode: ruby -*- # vi: set ft=ruby : require 'json' # Vagrant configuration Vagrant.configure(2) do |config| config.vm.box = "cedadev/centos7" Loading Loading @@ -31,18 +33,17 @@ Vagrant.configure(2) do |config| # Provision the VM with our Ansible playbook config.vm.provision :ansible do |ansible| ansible.playbook = "deploy/ansible/playbook.yml" ansible.groups = { data: ["default"] } # Configure the datasets from mini-esgf-data # Use group_vars to simulate ansible.extra_vars = { hostname: "192.168.100.100.nip.io", data_mounts: [ # Use group_vars to simulate the advice in the documentation # However, because the Ansible provisioner doesn't have a native group_vars # property, like it does for {extra,host}_vars, we need to convert to JSON data_mounts = [ { host_path: "/test_data", mount_path: "/test_data" } ], data_datasets: [ ] data_datasets = [ { name: "CMIP5", path: "esg_cmip5", Loading @@ -54,6 +55,14 @@ Vagrant.configure(2) do |config| location: "/test_data/group_workspaces/jasmin2/cp4cds1/data/c3s-cordex" } ] ansible.groups = { "data" => ["default"], "data:vars" => { "hostname" => "192.168.100.100.nip.io", "image_tag" => "issue-112-nginx-data-node", "data_mounts" => "#{data_mounts.to_json}", "data_datasets" => "#{data_datasets.to_json}" } } end end deploy/ansible/group_vars/all.yml→deploy/ansible/roles/data/defaults/main.yml +0 −26 Original line number Diff line number Diff line --- ### # The hostname to use - by default, use the FQDN of the host ### hostname: "{{ ansible_fqdn }}" ### # Configuration for private registries that require authentication ### docker_registries: [] # - registry: my.registry.org # username: registryuser # password: registrypassword ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required Loading Loading @@ -85,14 +70,3 @@ fileserver_image_prefix: "{{ image_prefix }}" fileserver_image_tag: "{{ image_tag }}" fileserver_image_pull: "{{ image_pull }}" fileserver_image_repository: nginx ### # Proxy configuration ### # Settings for the proxy image proxy_image_prefix: "{{ image_prefix }}" proxy_image_tag: "{{ image_tag }}" proxy_image_pull: "{{ image_pull }}" proxy_image_repository: nginx deploy/ansible/roles/docker/defaults/main.yml 0 → 100644 +9 −0 Original line number Diff line number Diff line --- ### # Configuration for private registries that require authentication ### docker_registries: [] # - registry: my.registry.org # username: registryuser # password: registrypassword deploy/ansible/roles/proxy/defaults/main.yml 0 → 100644 +39 −0 Original line number Diff line number Diff line --- ### # The hostname to use - by default, use the FQDN of the host ### hostname: "{{ ansible_fqdn }}" ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required ### # The image prefix to use # If using a private registry, change this, e.g. registry.ceda.ac.uk/esgfdeploy image_prefix: esgfdeploy # The image tag to use image_tag: latest # Indicates whether images should be pulled every time the playbook runs # When using mutable tags, like latest or branch names, this should be true # When using immutable tags, like commit shas or release tags, this can be false image_pull: true ### # Proxy configuration ### # Settings for the proxy image proxy_image_prefix: "{{ image_prefix }}" proxy_image_tag: "{{ image_tag }}" proxy_image_pull: "{{ image_pull }}" proxy_image_repository: nginx # Indicates if THREDDS is enabled or not thredds_enabled: true # Indicates if the Nginx file server should be deployed or not fileserver_enabled: true Loading
Vagrantfile +31 −22 Original line number Diff line number Diff line # -*- mode: ruby -*- # vi: set ft=ruby : require 'json' # Vagrant configuration Vagrant.configure(2) do |config| config.vm.box = "cedadev/centos7" Loading Loading @@ -31,18 +33,17 @@ Vagrant.configure(2) do |config| # Provision the VM with our Ansible playbook config.vm.provision :ansible do |ansible| ansible.playbook = "deploy/ansible/playbook.yml" ansible.groups = { data: ["default"] } # Configure the datasets from mini-esgf-data # Use group_vars to simulate ansible.extra_vars = { hostname: "192.168.100.100.nip.io", data_mounts: [ # Use group_vars to simulate the advice in the documentation # However, because the Ansible provisioner doesn't have a native group_vars # property, like it does for {extra,host}_vars, we need to convert to JSON data_mounts = [ { host_path: "/test_data", mount_path: "/test_data" } ], data_datasets: [ ] data_datasets = [ { name: "CMIP5", path: "esg_cmip5", Loading @@ -54,6 +55,14 @@ Vagrant.configure(2) do |config| location: "/test_data/group_workspaces/jasmin2/cp4cds1/data/c3s-cordex" } ] ansible.groups = { "data" => ["default"], "data:vars" => { "hostname" => "192.168.100.100.nip.io", "image_tag" => "issue-112-nginx-data-node", "data_mounts" => "#{data_mounts.to_json}", "data_datasets" => "#{data_datasets.to_json}" } } end end
deploy/ansible/group_vars/all.yml→deploy/ansible/roles/data/defaults/main.yml +0 −26 Original line number Diff line number Diff line --- ### # The hostname to use - by default, use the FQDN of the host ### hostname: "{{ ansible_fqdn }}" ### # Configuration for private registries that require authentication ### docker_registries: [] # - registry: my.registry.org # username: registryuser # password: registrypassword ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required Loading Loading @@ -85,14 +70,3 @@ fileserver_image_prefix: "{{ image_prefix }}" fileserver_image_tag: "{{ image_tag }}" fileserver_image_pull: "{{ image_pull }}" fileserver_image_repository: nginx ### # Proxy configuration ### # Settings for the proxy image proxy_image_prefix: "{{ image_prefix }}" proxy_image_tag: "{{ image_tag }}" proxy_image_pull: "{{ image_pull }}" proxy_image_repository: nginx
deploy/ansible/roles/docker/defaults/main.yml 0 → 100644 +9 −0 Original line number Diff line number Diff line --- ### # Configuration for private registries that require authentication ### docker_registries: [] # - registry: my.registry.org # username: registryuser # password: registrypassword
deploy/ansible/roles/proxy/defaults/main.yml 0 → 100644 +39 −0 Original line number Diff line number Diff line --- ### # The hostname to use - by default, use the FQDN of the host ### hostname: "{{ ansible_fqdn }}" ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required ### # The image prefix to use # If using a private registry, change this, e.g. registry.ceda.ac.uk/esgfdeploy image_prefix: esgfdeploy # The image tag to use image_tag: latest # Indicates whether images should be pulled every time the playbook runs # When using mutable tags, like latest or branch names, this should be true # When using immutable tags, like commit shas or release tags, this can be false image_pull: true ### # Proxy configuration ### # Settings for the proxy image proxy_image_prefix: "{{ image_prefix }}" proxy_image_tag: "{{ image_tag }}" proxy_image_pull: "{{ image_pull }}" proxy_image_repository: nginx # Indicates if THREDDS is enabled or not thredds_enabled: true # Indicates if the Nginx file server should be deployed or not fileserver_enabled: true