diff --git a/README.md b/README.md index e5f2cf3cb6e5c2f8aae23dd3106f23d7823b6b88..c7d0d413b5c9ec49001b5af32b47ee3bad92fb8a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Acutally, this project does : 2. Deploy a cluster HDFS on : * [Your own computer using as many virtual machine you want using Vagrant & ansible](#deploy-cluster-hdfs-with-multiple-vms) * [multiple servers using ansible](#deploy-cluster-hdfs-on-servers) +3. Deploy a geonetwork as metadata system management + * [Your own computer using a virtual machine with Vagrant & ansible provision] **Prod Environment** : Deploy a mononode HDFS on a server using ansible **Sandbox Environment**: Deploy a mononode HDFS on a VM from Vagrant & Ansible @@ -83,13 +85,13 @@ Then run the script [ansible-launch.sh](ansible-launch.sh) : # Deploy a HDFS cluster ## Deploy cluster HDFS with multiple VMs 1. Set your nodes' IP address in [VagrantFile](vagrant/cluster/Vagrantfile). -Inside this file, edit your network setting (name for your interface adaptator and DNS option) -2. Declare those IP for ansible provision in [vars](playbook/roles/hosts-file/vars/main.yml) +Inside this file, edit your network setting (as DNS nameserver: if your host machine is on a corporate network, your network administrator may have set rules about using DNS servers. In this case, your network allows only your company's DNS. Please edit them in the settings section *and* in provision shell in vagrantFile. If this is not the case (i.e. no DNS rules), please assign "false" to the COMPANY_NETWORK_DNS_RULE variable. +2. Declare those IP for ansible provision in [vars](playbook/roles/hosts-file/vars/main.yml). If you did not change IP setting, skip this step. 3. Configure your own computer to access to your nodes using their hostname (need for access to hadoop web ui) ```shell vim /etc/hosts ``` - if you did not edit your cluster settings since you git have pulled, you may want to use this default settings: + if you did not edit your cluster settings since you have git pulled, you may want to use this default settings: ```shell 10.0.0.10 namenode 10.0.0.11 datanode1 @@ -121,6 +123,18 @@ Inside this file, edit your network setting (name for your interface adaptator a ## Deploy cluster HDFS on servers work in progress +# Deploy GeoNetwork +## With Vagrant and ansible +1. Set your nodes' IP address in [VagrantFile](vagrant/geonetwork/Vagrantfile). +Inside this file, edit your network setting (as DNS nameserver: if your host machine is on a corporate network, your network administrator may have set rules about using DNS servers. In this case, your network allows only your company's DNS. Please edit them in the settings section *and* in provision shell in vagrantFile. If this is not the case (i.e. no DNS rules), please assign "false" to the COMPANY_NETWORK_DNS_RULE variable. +2. in cli : start a geonetwork vm form this directory : vagrant/geonetwork](vagrant/geonetwork) : + ```shell + vagrant up + ``` +3. On your own computer, using a webrowser, go on http://10.0.0.9:8080/geonetwork (if IP address as default) +## On server +work in progress + ## License  diff --git a/vagrant/cluster/Vagrantfile b/vagrant/cluster/Vagrantfile index abdcf6da0752266786fe2451703100f8807c26a3..842ed64e6b1d0ca1a2b359fe43d097f1d37f2a3d 100644 --- a/vagrant/cluster/Vagrantfile +++ b/vagrant/cluster/Vagrantfile @@ -2,6 +2,8 @@ NUMBER_OF_DATANODE = 2 DEPLOY_Geonetwork = false ENTREPRISE_NETWORK_DNS_RULE = true +DNS_server_1 = "172.16.1.1" +DNS_server_2 = "172.16.1.2" ### end of Configuration parameters ### Vagrant.configure("2") do |config| diff --git a/vagrant/geonetwork/Vagrantfile b/vagrant/geonetwork/Vagrantfile index 376e3e998c47a4951f9035ce7ca9d36c85407a5e..a3a6af3a7087cfb903f789658b7c9b665f0acde9 100644 --- a/vagrant/geonetwork/Vagrantfile +++ b/vagrant/geonetwork/Vagrantfile @@ -1,18 +1,23 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +### Configuration parameters ### +ENTREPRISE_NETWORK_DNS_RULE = true +DNS_server_1 = "172.16.1.1" +DNS_server_2 = "172.16.1.2" +### end of Configuration parameters ### Vagrant.configure("2") do |config| config.vm.box = "generic/debian9" config.vm.define "aidmoit-geonetwork" config.vm.hostname = "aidmoit-geonetwork" - config.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true - - config.vm.provision "shell", inline: <<-SHELL - systemctl stop resolvconf - echo "nameserver 10.34.192.61" >> /etc/resolv.conf - echo "nameserver 10.34.192.62" >> /etc/resolv.conf - SHELL + if ENTREPRISE_NETWORK_DNS_RULE == true + config.vm.provision "shell", inline: <<-SHELL + systemctl stop resolvconf + echo "nameserver 172.16.1.1" > /etc/resolv.conf + echo "nameserver 172.16.1.2" >> /etc/resolv.conf + SHELL + end config.vm.network :private_network, ip: "10.0.0.9"