-
Notifications
You must be signed in to change notification settings - Fork 6
Generating updated LA configuration properties files
Many times, we find ourselves asking for some updated configuration for some service to other portals. Or the configuration directory structures, permissions etc.
This can be useful for instance to:
- use in your docker images
- to compare with your current configuration
- to use in a development environment
- to package some default configuration
- for documentation purposes
We can use our LA generator and run ansiblew
(the ansible-playbook
wrapper) to generate only the properties for the LA services.
For this run the generator with your specific node values and patch the generated main inventory and ansiblew
like this:
diff --git a/ansiblew b/ansiblew
index a4c183a..5a71786 100755
--- a/ansiblew
+++ b/ansiblew
@@ -17,6 +17,7 @@ Options:
--nodryrun Exec the ansible-playbook commands
-p --properties Only update properties
-l --limit=<hosts> Limit to some inventories hosts
+ -L Limit to localhost
-s --skip=<tags> Skip tags
-t --tags=<tags> Limit to tags
-h --help Show help options.
@@ -39,6 +40,7 @@ if __name__ == '__main__':
skip = args['--skip']
tags = args['--tags']
limit = args['--limit']
+ local = args['-L']
main = args['main']
doall = args['all']
alainstall = args['--alainstall']
@@ -53,6 +55,9 @@ if __name__ == '__main__':
if debug:
print(args)
+ if local:
+ limit = "localhost"
+
if properties:
extras = "%s --tags properties" % (extras)
if skip:
diff --git a/gbif-es-inventory.yml b/gbif-es-inventory.yml
index deb5fb2..4400e68 100644
--- a/gbif-es-inventory.yml
+++ b/gbif-es-inventory.yml
@@ -16,61 +16,77 @@ ansible_become=yes
[ala-demo]
datos.gbif.es
-
+localhost ansible_connection=local
[collectory]
colecciones.gbif.es
+localhost ansible_connection=local
[biocache-hub]
registros.gbif.es
+localhost ansible_connection=local
[biocache-service-clusterdb]
registros-ws.gbif.es
+localhost ansible_connection=local
[bie-hub]
especies.gbif.es
+localhost ansible_connection=local
[bie-index]
especies-ws.gbif.es
+localhost ansible_connection=local
[image-service]
imagenes.gbif.es
+localhost ansible_connection=local
[species-list]
listas.gbif.es
+localhost ansible_connection=local
[regions]
regiones.gbif.es
+localhost ansible_connection=local
[logger-service]
logger.gbif.es
+localhost ansible_connection=local
[solr7-server]
index.gbif.es
+localhost ansible_connection=local
[cas-servers]
auth.gbif.es
+localhost ansible_connection=local
[biocache]
jenkins.gbif.es
+localhost ansible_connection=local
[biocache-cli]
jenkins.gbif.es
+localhost ansible_connection=local
[spatial]
espacial.gbif.es
+localhost ansible_connection=local
[webapi_standalone]
api.gbif.es
+localhost ansible_connection=local
[nameindexer]
jenkins.gbif.es
+localhost ansible_connection=local
[all:vars]
is_vagrant=false
# Mounted storage is usually /mnt on EC2. Create a symlink to /mnt -> /data
-data_dir=/data
+data_dir=/home/youruser/dev/ala-properties
demo_hostname = datos.gbif.es
skin_home_url = https://datos.gbif.es
(in this example we patch a copy of the gbif.es inventories) so running:
./ansiblew --alainstall=../ala-install-up-to-date all -p -L --nodryrun
You will get the typical /data/*/config/*
files for the main LA services (collectoy, biocache, biocache-cli, bie, species list, logger, etc) updated for you node, in:
/home/youruser/dev/ala-properties
So you'll obtain:
.
├── ala-bie
│ └── config
├── ala-collectory
│ ├── config
│ │ ├── ala-collectory-config.properties
│ │ ├── charts.json
│ │ ├── connection-profiles.json
│ │ └── default-gbif-licence-mapping.json
│ ├── data
│ │ └── taxa
│ │ └── taxa.json
│ ├── taxa
│ │ └── data
│ └── upload
│ └── tmp
├── ala-hub
│ ├── cache
│ ├── config
│ │ ├── ala-hub-config.properties
│ │ ├── charts.json
│ │ ├── GeoLite2-City.mmdb
│ │ ├── grouped_facets_ala.json
│ │ └── system-message.json
│ ├── download
│ │ └── GeoLite2-City.tar.gz
│ └── geolite_db
│ └── GeoLite2-City_20191112
│ ├── COPYRIGHT.txt
│ ├── GeoLite2-City.mmdb
│ ├── LICENSE.txt
│ └── README.txt
├── bie
│ └── import
├── bie-index
│ └── config
│ ├── bie-index-config.yml
│ ├── conservation-lists.json
│ ├── favourites.json
│ ├── image-lists.json
│ └── vernacular-lists.json
├── biocache
│ ├── config
│ │ ├── biocache-config.properties
│ │ ├── facets.json
│ │ ├── log4j.xml
│ │ └── subgroups.json
│ └── layers
├── biocache-delete
├── biocache-load
├── biocache-media
├── biocache-upload
│ ├── status
│ └── temp
├── cache
├── offline
│ └── exports
├── regions
│ └── config
│ ├── menu-config.json
│ ├── regions-config.properties
│ ├── state-emblems.json
│ └── stateEmblems.txt
├── specieslist-webapp
│ └── config
│ └── specieslist-webapp-config.properties
├── tmp
└── tool
Prerequisite:
- some
tomcat7
user in your machine or you can also configure thetomcat
andtomcat7_user
variables. - sudo access or something similar
For now this doesn't works for CAS and Spatial services because they use a include_role
. See tag inheritance.