ystia / yorc

Ystia Orchestrator
https://ystia.github.io
Apache License 2.0
67 stars 23 forks source link

Feature/gh 648 ansible version #686

Closed laurentganne closed 4 years ago

laurentganne commented 4 years ago

Pull Request description

Description of the change

Using Ansible 2.10.0 (instead of Ansible 2.7.9 in previous version)

What I did

commands/bootstrap/resources/topology/tosca_types.zip: Fixed deprecation warnings and errors. See details in Ystia forge pull request https://github.com/ystia/forge/pull/137

commands/bootstrap/setup.go Paramiko is not anymore in ansible package requirements, it has to be installed in case the use of openssh is not enforced in yorc configuration.

prov/ansible/execution.go Ansible 2.10 will attempt to discover a suitable Python interpreter on each target host the first time a Python module is executed for that host. As decribed in https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html this new behavior appears in logs as a warning. By default here, we set ansible_python_interpreter to auto_silent, to avoid warnings.

doc/bootstrap.rst Documented the need to install paramiko. Updated examples referencing ansible_python_interpreter

doc/configuration.rst Updated sections referencing ansible_python_interpreter

doc/install.rst Added a command to install paramiko

doc/tosca.rst Updated section on ansible_python_interpreter

doc/upgrade.rst

Added a section to describe how to upgrade to ansible 2.10.0

prov/ansible/yaml_output.go: Fixed an issue displaying the output of scripts embedded as ansible shell commands.

versions.yaml Updated ansible version to 2.10.0

How to verify it

Bootstrap Yorc on gcloud using different target OS versions: CentOS 7, CentOS 8 (fails with Ansible 2.7.9 as this version doesn't detect where python is), Ubuntu 20.04

On the bootrsrapped Yorc, deploy applications made of Compute instances hosting components using ansible playbooks for their interfaces implementations.

Deploy applications using hosted operations as defined in the sample at https://github.com/ystia/tosca-samples/tree/develop/org/ystia/yorc/samples/OrchestratorHost using these 2 different Yorc configurations:

Description for the changelog

Upgrade Ansible version from 2.7.9 (GH-648)

Applicable Issues

Fixes #648

codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit 2419ab75 and detected 0 issues on this pull request.

View more on Code Climate.

sonarcloud[bot] commented 4 years ago

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

9.1% 9.1% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_151) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more here