development doc updates; drop python2 dependency for debian/ubuntu hosts (only needed for AL2/yum)

This commit is contained in:
Lee Goolsbee
2022-09-08 16:48:43 -05:00
parent 1eb82cba0b
commit a560258945
2 changed files with 31 additions and 20 deletions

View File

@@ -1,8 +1,9 @@
## Prerequisites ## Prerequisites
You should have the following software installed: You should have the following software installed:
* Python; 3.x by preference, but 2.7 works. * Python; 3.8 or newer
* You may also need the Python development packages depending on how its installed. * You may also need the Python development packages depending on how its installed
* Note that the runtime still requires Python 2 for certain tasks on Amazon Linux 2, but is not necessary for local development
* Python Virtualenv * Python Virtualenv
* Docker * Docker
* Cloudtoken * Cloudtoken
@@ -17,23 +18,24 @@ All other requirements will be installed under Virtualenv.
### Step 1.2: Install development environment dependencies ### Step 1.2: Install development environment dependencies
To ensure compatibility we specify a specific Ansible version; currently 2.7.11 To ensure compatibility we specify a specific Ansible version; currently
(some older versions had issues with RDS). We do this with ansible-core 2.13.x. We do this with [Pipenv](https://docs.pipenv.org/) to lock
[Pipenv](https://docs.pipenv.org/) to lock the dependency tree. There are 2 main the dependency tree. There are 2 main ways to do this; either directly if
ways to do this; either directly if packaged, or via pip... packaged, or via pip...
# Ubuntu 19.04+, Debian 10+ # Ubuntu 22.04+, Debian 11+
sudo apt-get install pipenv python-dev sudo apt-get install libpq-dev python3-dev python3-pip
# Older versions & RHEL/Amazon Linux, etc. # Amazon Linux 2
sudo apt-get install -y python-pip python-dev sudo amazon-linux-extras enable python3.8
# Or... sudo yum install gcc libpq-devel python38 python38-pip python38-devel python-lxml
sudo yum install -y python-pip python-dev
pip install pipenv
# Mac via Homebrew # Mac via Homebrew
brew install pipenv brew install libpq python@X.x # (where "X.x") is 3.8 or newer
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> ~/.zshrc # (or other shell profile)
# Finally
pip3 install pipenv
### Step 1.3: Enter the development environment ### Step 1.3: Enter the development environment
@@ -44,11 +46,21 @@ development environment:
pipenv sync --dev pipenv sync --dev
pipenv shell --dev pipenv shell --dev
### Step 1.4: Run some tests against a role ### Step 1.4: Install Ansible collections
[Molecule](https://molecule.readthedocs.io/en/stable/) is a testing framework for Ansible. We use this to test the To save a little time during deployment, we rely directly on ansible-core and a
functionality of individual and groups of roles, and to ensure cross-platform custom set of collections as opposed to installing the community edition. To that
compatibility (currently Amazon Linux 2 and Ubuntu LTS). end, when testing locally, you'll need these collections installed where Ansible
expects them to be; that path is configured ansible.cfg and used automatically
when collections are installed via `ansible-galaxy`:
ansible-galaxy collection install --upgrade --verbose --requirements-file requirements.yml
### Step 1.5: Run some tests against a role
[Molecule](https://molecule.readthedocs.io/en/stable/) is a testing framework for
Ansible. We use this to test the functionality of individual and groups of roles,
and to ensure cross-platform compatibility (currently Amazon Linux 2 and Ubuntu LTS).
Were going to check that the role that downloads the products works for both Were going to check that the role that downloads the products works for both
Jira Core and Confluence, on boths supported Linux distributions. So run the Jira Core and Confluence, on boths supported Linux distributions. So run the

View File

@@ -19,7 +19,6 @@ else
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
libpq-dev \ libpq-dev \
python2 \
python3-dev \ python3-dev \
python3-pip python3-pip
fi fi