Skip to content

Commit 20b5926

Browse files
author
afabiani
committed
- Removing Ansible install docs since it is not currently supported anymore
1 parent 08298b0 commit 20b5926

File tree

3 files changed

+3
-229
lines changed

3 files changed

+3
-229
lines changed

basic/settings/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ SOCIAL_ORIGINS
19771977
A list of dictionaries that are used to generate the social links displayed in the Share tab. For each origin, the name and URL format parameters are replaced by the actual values of the ResourceBase object (layer, map, document).
19781978

19791979
SOCIALACCOUNT_WITH_GEONODE_LOCAL_SINGUP
1980-
----
1980+
---------------------------------------
19811981

19821982
Default: ``True``
19831983

@@ -1993,7 +1993,8 @@ SRID
19931993
}
19941994

19951995
SEARCH_RESOURCES_EXTENDED
1996-
----
1996+
-------------------------
1997+
19971998
Default: ``True``
19981999

19992000
This will extend search with additinoal properties. By default its on and search engine will check resource title or purpose or abstract.

install/project/index.rst

-219
Original file line numberDiff line numberDiff line change
@@ -286,222 +286,3 @@ Run the containers in daemon mode
286286
287287
docker-compose -f docker-compose.yml -f docker-compose.override.example-org.yml up --build -d
288288
289-
.. _install-with-ansible:
290-
291-
Ansible
292-
=======
293-
`Ansible <https://www.ansible.com/>`__ is an open-source software provisioning, configuration management, and application-deployment tool for IT infrastructure. It is written in `Python <https://www.python.org/>`_ and
294-
allows users to manage `nodes` (computers) over SSH. Configuration files are written in `YAML <https://en.wikipedia.org/wiki/YAML>`_, a simple, human-readable, data serialization format.
295-
296-
Ansible can be used for automating the manual installation process of GeoNode. In case you're new to GeoNode we suggest first to get an Overview of :doc:`/install/core/index` components.
297-
298-
299-
Installing Ansible
300-
^^^^^^^^^^^^^^^^^^
301-
302-
Before you install `Ansible` make sure you have Python 2 (version 2.7) or Python 3 (versions 3.5 and higher)
303-
on the controlling machine, you will also need an SSH client. Most Linux distributions
304-
come with an SSH client preinstalled.
305-
306-
.. note:: For further installation instruction, please visit the `official installation documentation <http://docs.ansible.com/ansible/intro_installation.html>`_.
307-
308-
309-
Test your Setup
310-
^^^^^^^^^^^^^^^
311-
312-
After you've installed Ansible, you can test your setup by use of the following command
313-
314-
.. code::
315-
316-
ansible localhost -m ping
317-
318-
You should get the following output::
319-
320-
localhost | success >> {
321-
"changed": false,
322-
"ping": "pong"
323-
}
324-
325-
Ansible Hosts file
326-
^^^^^^^^^^^^^^^^^^
327-
328-
Ansible keeps information about the managed nodes in the `inventory` or `hosts file`.
329-
Edit or create the hosts file with your favorite editor::
330-
331-
vim /etc/ansible/hosts
332-
333-
This file should contain a list of nodes for Ansible to manage. Nodes can be referred to
334-
either with IP or hostname. The syntax is the following::
335-
336-
192.168.1.50
337-
aserver.example.org
338-
bserver.example.org
339-
340-
For targeting several servers you can group them like::
341-
342-
mail.example.com
343-
344-
[webservers]
345-
foo.example.com
346-
bar.example.com
347-
348-
[dbservers]
349-
one.example.com
350-
two.example.com
351-
three.example.com
352-
353-
[geonode]
354-
mygeonode.org
355-
356-
Public Key access
357-
^^^^^^^^^^^^^^^^^
358-
359-
To avoid having to type your user's password to connect to the nodes over and over, using
360-
SSH keys is recommended. To setup Public Key SSH access to the nodes. First, create a key pair::
361-
362-
ssh-keygen
363-
364-
And follow the instructions on the screen. A new key pair will be generated and
365-
placed inside the `.ssh` folder in your user's home directory.
366-
367-
All you need to do now is copy the public key (id_rsa.pub) into the `authorized_keys`
368-
file on the node you want to manage, inside the user's home directory. For example,
369-
if you want to be able to connect to mygeonode.org as user `geo` edit the
370-
/home/geo/.ssh/authorized_keys file on the remote machine and add the content
371-
of your public key inside the file.
372-
373-
For more information on how to set up SSH keys in Ubuntu
374-
refer to `this <https://help.ubuntu.com/community/SSH/OpenSSH/Keys>`_ document.
375-
376-
Connect to managed nodes
377-
^^^^^^^^^^^^^^^^^^^^^^^^
378-
379-
Now that SSH access to the managed nodes is in place for all the nodes inside the Ansible
380-
`inventory` (hosts file), we can run our first command::
381-
382-
ansible geonode -m ping -u geo
383-
384-
.. note::
385-
386-
change `geo` with the username to use for SSH login
387-
388-
The output will be similar to this::
389-
390-
ansible all -m ping -u geo
391-
84.33.2.70 | success >> {
392-
"changed": false,
393-
"ping": "pong"
394-
}
395-
396-
We asked Ansible to connect to the machine in our `Inventory` grouped under `[geonode] as user `geo`
397-
and run the `module` ping (modules are Ansible's units of work).
398-
As you can see by the output, Ansible successfully connected to the remote machine
399-
and executed the module `ping`.
400-
401-
Ad hoc commands and playbooks
402-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
403-
404-
Ansible integrates two basic concepts of running commands:
405-
An ad-hoc command is something that you might type in to do something immediately,
406-
but don’t want to save for later. One example of an ad-hoc command is the ping command we just ran. We typed in the
407-
command line and ran it interactively.
408-
409-
For more information on ad-hoc command refer to the `adhoc documentation section <https://docs.ansible.com/ansible/intro_adhoc.html>`_.
410-
411-
Playbooks are Ansible’s configuration, deployment and orchestration language.
412-
In contrast to ad hoc commands, Playbooks can declare configurations, but they can also orchestrate steps of any manual ordered process.
413-
414-
For more information on playbooks refer to the `playbook documentation section <https://docs.ansible.com/ansible/latest/user_guide/playbooks.html>`_.
415-
416-
In the following, we will provide you an example on how to setup a playbook for installing GeoNode on a server.
417-
418-
419-
Installing GeoNode project by use of a playbook
420-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
421-
422-
First, we have to install the underlying steps for installing geonode provided by the official GeoNode role::
423-
424-
$ ansible-galaxy install geonode.geonode
425-
426-
427-
.. note:: Roles are ways of automatically loading certain vars_files, tasks, and handlers based on a known file structure. Grouping content by roles also allows easy sharing of roles with other users.
428-
429-
See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html
430-
431-
To find out how these install tasks are defined, we suggest having a look a the `different tasks <https://github.com/GeoNode/ansible-geonode/tree/master/tasks>`_ of role geonode.
432-
433-
Setup a playbook
434-
^^^^^^^^^^^^^^^^
435-
436-
After installation of the role geonode.geonode we will now create a simple playbook which defines what should happen.
437-
Create the playbook file where it suits best for you. For example in your home folder::
438-
439-
mkdir ~/geonode_ansible
440-
vim ~/geonode_ansible/install_geonode.yml
441-
442-
with following content
443-
444-
.. code-block:: shell
445-
446-
---
447-
- name: Provision a GeoNode into Production
448-
hosts: geonode
449-
remote_user: geo
450-
vars:
451-
app_name: my_geonode
452-
server_name: 84.33.2.70
453-
deploy_user: ubuntu
454-
code_repository: https://github.com/GeoNode/geonode-project.git
455-
branch_name: master
456-
virtualenv_dir: /home/geo/.venvs
457-
site_url: http://mygeonode.org/
458-
geoserver_url: https://build.geo-solutions.it/geonode/geoserver/latest/geoserver-2.16.2.war
459-
pg_max_connections: 100
460-
pg_shared_buffers: 128MB
461-
tomcat_xms: 1024M
462-
tomcat_xmx: 2048M
463-
nginx_client_max_body_size: 400M
464-
gather_facts: False
465-
pre_tasks:
466-
- name: Install python for Ansible
467-
become: yes
468-
become_user: root
469-
raw: test -e /usr/bin/python || (apt -y update && apt install -y python3-minimal)
470-
roles:
471-
- { role: GeoNode.geonode }
472-
473-
474-
The playbook is composed of different parts. The most important are:
475-
476-
The **hosts part** specifies to which hosts in the Inventory this playbook applies and
477-
how to connect to them. This points to your hosts file with grouped servers under `[geonode]` as
478-
explained before. (Most likely you will only have one node under group geonode)
479-
480-
The **vars** section mainly describe configured settings. Please visit the geonode ansible readme regarding `role variables <https://github.com/GeoNode/ansible-geonode#role-variables>`_.
481-
482-
**Roles** points to our installed geonode role which has all needed installation tasks.
483-
484-
485-
486-
Run the Playbook
487-
^^^^^^^^^^^^^^^^
488-
489-
Now that we have created our Playbook, we can execute it with::
490-
491-
ansible-playbook ~/geonode_ansible/install_geonode.yml -u geo
492-
493-
PLAY [84.33.2.70] *************************************************************
494-
495-
GATHERING FACTS ***************************************************************
496-
ok: [84.33.2.70]
497-
498-
...
499-
500-
Ansible should connect to the host specified in the hosts section grouped by `[geonode]` and run the install tasks one by one. If something goes wrong Ansible will fail fast and stop the installation process.
501-
When successfully finished you should be able to see GeoNode's welcome screen at your `site_url`.
502-
503-
This concludes our brief tutorial on Ansible. For a more thorough introduction
504-
refer to the `official documentation <https://docs.ansible.com/>`_.
505-
506-
Also, take a look at the `Ansible examples repository <https://github.com/ansible/ansible-examples>`_
507-
or a set of Playbooks showing common techniques.

start/quick/index.rst

-8
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ To try out the applications, simply:
5353
`OSGeoLive <http://live.osgeo.org/>`_ is an `OSGeo Foundation <http://osgeo.org/>`_ project.
5454
The `OSGeo Foundation <http://osgeo.org/>`_ is a not-for-profit supporting Geospatial Open Source Software development, promotion and `education <http://www.geoforall.org/>`_.
5555

56-
Install via Ansible
57-
^^^^^^^^^^^^^^^^^^^
58-
59-
`Ansible <https://www.ansible.com/>`__ is an open source automation tool for server configuration and management. It works by organizing your server inventory into groups, describes how those groups should be configured or what actions should be taken on them. We can use ansible for installing GeoNode-project on one or many servers.
60-
61-
* :ref:`Manual installation of geonode-project <install-with-ansible>` by use of Ansible
62-
63-
6456
Install via Docker
6557
^^^^^^^^^^^^^^^^^^
6658

0 commit comments

Comments
 (0)