Difference between revisions of "Installation/Ansible"

From OpenFOAMWiki
(First version of the Ansible-Installation-page)
 
m (Add clone command for BitBucket)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
The aim of this project is to automatically build OpenFOAM-variants from source using the tool [https://www.ansible.com/ Ansible]. The script installs all the requirements before attempting to compile OpenFOAM
 
The aim of this project is to automatically build OpenFOAM-variants from source using the tool [https://www.ansible.com/ Ansible]. The script installs all the requirements before attempting to compile OpenFOAM
  
The fool description can be found in [https://sourceforge.net/p/openfoam-extend/ansibleFoamInstallation/ci/default/tree/README.md this subproject in OpenFOAM-extend].
+
The full description can be found in [https://sourceforge.net/p/openfoam-extend/ansibleFoamInstallation/ci/default/tree/README.md this subproject in OpenFOAM-extend].
  
 
The only requirements for this script to work are [https://www.mercurial-scm.org/ Mercurial] (for getting the sources) and  [https://www.ansible.com/ Ansible]. They should be installed through the  
 
The only requirements for this script to work are [https://www.mercurial-scm.org/ Mercurial] (for getting the sources) and  [https://www.ansible.com/ Ansible]. They should be installed through the  
Line 16: Line 16:
 
</bash>
 
</bash>
 
On a supported Linux this makes sure that all the required packages are installed, it pulls the required sources and builds them (this may take a couple of hours)
 
On a supported Linux this makes sure that all the required packages are installed, it pulls the required sources and builds them (this may take a couple of hours)
 +
 +
To install only a single FOAM-distro (in this example OpenFOAM+ v1706) call
 +
<bash>
 +
sudo ansible-playbook exampleConfigs/fullInstall.yml --extra-vars=distro=p1706
 +
</bash>
  
 
For further information see [https://sourceforge.net/p/openfoam-extend/ansibleFoamInstallation/ci/default/tree/README.md the latest Version of the README]
 
For further information see [https://sourceforge.net/p/openfoam-extend/ansibleFoamInstallation/ci/default/tree/README.md the latest Version of the README]
 +
 +
=== Development version ===
 +
 +
To get to the latest development version do
 +
<bash>
 +
hg update develop
 +
</bash>
 +
on the command line
  
 
== Other ==
 
== Other ==
  
A backup-version of the repository can be found at [https://bitbucket.org/bgschaid/ansiblefoaminstallation on BitBucket]
+
A backup-version of the repository can be found at [https://bitbucket.org/bgschaid/ansiblefoaminstallation on BitBucket]. It can be cloned with
 +
<bash>
 +
hg clone https://bitbucket.org/bgschaid/ansiblefoaminstallation
 +
</bash>
  
 
[[Category:Installing OpenFOAM]]
 
[[Category:Installing OpenFOAM]]

Latest revision as of 09:25, 4 July 2019

The aim of this project is to automatically build OpenFOAM-variants from source using the tool Ansible. The script installs all the requirements before attempting to compile OpenFOAM

The full description can be found in this subproject in OpenFOAM-extend.

The only requirements for this script to work are Mercurial (for getting the sources) and Ansible. They should be installed through the

1 Basic Usage

First get the sources:

 
hg clone http://hg.code.sf.net/p/openfoam-extend/ansibleFoamInstallation
cd ansibleFoamInstallation

Then a playbook with the requirements has to be edited. There is already an example playbook that builds three different Foam versions with cfMesh and swak4foam and also installs PyFoam :

 
sudo ansible-playbook exampleConfigs/allFoams.yml

On a supported Linux this makes sure that all the required packages are installed, it pulls the required sources and builds them (this may take a couple of hours)

To install only a single FOAM-distro (in this example OpenFOAM+ v1706) call

 
sudo ansible-playbook exampleConfigs/fullInstall.yml --extra-vars=distro=p1706

For further information see the latest Version of the README

1.1 Development version

To get to the latest development version do

 
hg update develop

on the command line

2 Other

A backup-version of the repository can be found at on BitBucket. It can be cloned with

 
hg clone https://bitbucket.org/bgschaid/ansiblefoaminstallation