Skip to content

Instantly share code, notes, and snippets.

@lukas-vlcek
Created November 10, 2017 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukas-vlcek/bd7f2a22bb6aba81cdf7349e864ce438 to your computer and use it in GitHub Desktop.
Save lukas-vlcek/bd7f2a22bb6aba81cdf7349e864ce438 to your computer and use it in GitHub Desktop.
Clean and setup Python2 from scratch
Before logging is deployed into AWS, this is a way how to make sure there won't be any python(2) libray conflicts.
1) Make sure there is no Python2 on my machine at all
```
pip freeze | sudo xargs pip uninstall -y
sudo dnf remove -y python2-libs
sudo dnf list --installed | grep python2
sudo rm -rf /lib/python2
sudo dnf clean all
sudo dnf check
```
2) Install python2 again
```
sudo dnf install -y python2 python2-virtualenv
pip freeze
sudo dnf list --installed | grep python2
sudo dnf check
pip list
```
3) Use script to deploy logging to AWS
```
cd ~/origin && git pull origin master
cd ~/openshift-ansible && git pull origin master
cd ~/origin-aggregated-logging && git pull origin master
# [optionally]
# rm -rf .venv logging.log
wget -O oshift-oct-new-dev.sh https://raw.githubusercontent.com/richm/scripts/master/oshift-oct-new-dev.sh && chmod +x oshift-oct-new-dev.sh
./oshift-oct-new-dev.sh | tee logging.log
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment