Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gh 648 ansible version #686

Merged
merged 11 commits into from
Oct 8, 2020
Merged

Conversation

laurentganne
Copy link
Contributor

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 ystia/forge#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:

  • unsandboxed operations allowed
  • sandbox, using for example the docker image jfloff/alpine-python:2.7-slim

Description for the changelog

Upgrade Ansible version from 2.7.9 (GH-648)

Applicable Issues

Fixes #648

Copy link
Member

@loicalbertin loicalbertin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 👏

CHANGELOG.md Outdated Show resolved Hide resolved
commands/bootstrap/setup.go Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Oct 8, 2020

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

View more on Code Climate.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2020

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

@laurentganne laurentganne merged commit 9d46bb2 into develop Oct 8, 2020
@laurentganne laurentganne deleted the feature/GH-648-ansible-version branch October 8, 2020 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Ansible version from 2.7.9
2 participants