Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Fix pip installation failures for Consul#132

Merged
loicalbertin merged 3 commits intodevelopfrom
bugfix/GH-131_python_setuptools_missing
May 26, 2020
Merged

Fix pip installation failures for Consul#132
loicalbertin merged 3 commits intodevelopfrom
bugfix/GH-131_python_setuptools_missing

Conversation

@loicalbertin
Copy link
Member

Fix Consul installation issue
Remove use of easy_install which is now deprecated
and not anymore installed per default on recent systems

Pull Request description

Description of the change

Python easy_install is deprecated in favor of pip and is not delivered by default anymore on most of distributions. Unfortunately we used easy_install to install pip itself. This change install pip using distributions package managers

What I did

Stop using easy_install at all (do not even try to install it). Determine if we are running Python 2 or 3 and install the corresponding package.

How to verify it

On GCP you can test to deploy a consul server with different OS
Note that Ubuntu 20.04 is not supported with Ansible 2.7.9 (opened ystia/yorc#648 to track it)

Description for the changelog

  • Installation of Consul fails on recent Centos for GCP images (GH-131)

Applicable Issues

Fixes #131

Remove use of easy_install which is now deprecated
and not anymore installed per default on recent systems
Copy link
Contributor

@laurentganne laurentganne left a comment

Choose a reason for hiding this comment

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

Looks good!
The same change may be needed in the playbook installing Yorc at org/ystia/ansible/linux/ansible/playbooks/create.yml

@loicalbertin
Copy link
Member Author

loicalbertin commented May 26, 2020

Looks good!
The same change may be needed in the playbook installing Yorc at org/ystia/ansible/linux/ansible/playbooks/create.yml

Ho yes I see.
This is even worst because in ansible we force the use of python2 libs....

This seems to be an overkill but we may finally have to consider a component to install pip... and some dependencies.

@laurentganne
Copy link
Contributor

Looks good!
The same change may be needed in the playbook installing Yorc at org/ystia/ansible/linux/ansible/playbooks/create.yml

You mean in Yorc bootstrap?

Yes in bootstrap, and here in the forge as well at org/ystia/ansible/linux/ansible/playbooks/create.yml.
There are also the use of easy_install in the forge for docker container, at:
org/ystia/docker/containers/generic/playbooks/create.yaml

and also these ones that I'm not using personally:
org/ystia/samples/apache-log-generator/linux/ansible/apache-log-generator_install.yaml
org/ystia/ssl/ansible-ssl-certificates/playbooks/create.yml

@loicalbertin
Copy link
Member Author

Looks good!
The same change may be needed in the playbook installing Yorc at org/ystia/ansible/linux/ansible/playbooks/create.yml

You mean in Yorc bootstrap?

Yes in bootstrap, and here in the forge as well at org/ystia/ansible/linux/ansible/playbooks/create.yml.
There are also the use of easy_install in the forge for docker container, at:
org/ystia/docker/containers/generic/playbooks/create.yaml

and also these ones that I'm not using personally:
org/ystia/samples/apache-log-generator/linux/ansible/apache-log-generator_install.yaml
org/ystia/ssl/ansible-ssl-certificates/playbooks/create.yml

Ok I will limit to components involved in Yorc bootstrap for now.
Then we may consider having a component for dealing with this in a single place.
Maybe we can finish & refactor #75

@loicalbertin loicalbertin requested a review from laurentganne May 26, 2020 14:12
@loicalbertin
Copy link
Member Author

loicalbertin commented May 26, 2020

@laurentganne changed Ansible component too.

loicalbertin added a commit to ystia/yorc that referenced this pull request May 26, 2020
Copy link
Contributor

@laurentganne laurentganne left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation of consuland Ansible fails on recent centos for GCP images

2 participants