You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

1.1. Building the Docker image

  • Prerequisites:
    • You must place id_rsa file as roles/kepler/files/id_rsa and roles/ual/files/id_rsa
    • The id_rsa file contains private key which allows passwordless login to ssh://git@git.iter.org 
  • External documentation: http://docs.ansible.com/ansible-container/ 
  • Steps:

    # git-clone the main repo and make a small patch
    git clone https://github.com/ansible/ansible-container.git
    echo 'ENV DOCKER_CLIENT_TIMEOUT=600' >> ansible-container/container/docker/templates/conductor-local-dockerfile.j2
    sed -i 's/from pip.req import parse_requirements/try:\n    from pip._internal.req import parse_requirements\nexcept ImportError:\n    from pip.req import parse_requirements/g' ansible-container/setup.py
    
    # create virtualenv with ansible-container
    virtualenv venv
    source venv/bin/activate
    pip install -e ansible-container[docker]
    
    # FIXME: workaround to a bug https://github.com/ansible/ansible-container/issues/884
    pip install docker==2.7.0
    
    # git-clone this repository and start the build
    git clone https://bitbucket.org/tzok/imas-container
    cd imas-container
    ansible-container --vars-files vars.yml build --no-cache
    
    # once ready, save the image
    $ docker save imas-installer:latest | xz --threads=0 > imas-installer-latest.tar.xz
  • No labels