ansible / ansible-content-parser

Apache License 2.0
3 stars 4 forks source link

sage pipeline integration #5

Closed TamiTakamiya closed 1 year ago

TamiTakamiya commented 1 year ago

Invoke the sage pipeline from ansible-content-parser CLI. After creating a wheel (.whl) file by running python3 -m build command, the integration can be tested with the following steps (prereq: accesss to IBM artifactory PIP registry is needed for resolving dependencies on sage/ansible-risk-insights)

  1. Create workdir, setup venv, update pip

    mkdir /var/tmp/work
    cd /var/tmp/work
    python3 -m venv ./venv
    source ./venv/bin/activate
    pip3 install --upgrade pip
  2. Install ansible-content-parser, ansible-customization-data (and sage)

    
    $ cp /path/ansible_content_parser-*.whl /var/tmp/work
    $ pip3 install ansible_content_parser-*.whl
    $ pip3 install ansible-customization-data

$ which ansible-content-parser # make sure the script is installed

install extra

$ pip3 install tomli # a missing dependency? $ mkdir -p src/ansible_customization_data $ cp /path/config.toml src/ansible_customization_data # copy config.toml stored in ansible_customization_data repo


3. Set `ARI_KB_DATA_DIR` envvar
```bash
$ export ARI_KB_DATA_DIR=(your_path_to_ARI_KB_DIR)
  1. Run ansible-content-parser + sage + ansible-customization-data
    $ ansible-content-parser \
    -u https://github.com/IBM/Ansible-OpenShift-Provisioning.git \
    -o /var/tmp/out -v
TamiTakamiya commented 1 year ago

I will concentrate on CI setup and will close this for now.