Skip to content

Proxy input should be taken during initial run of pf9-cli #94

Description

@piyush271291

When the pf9-cli is first triggered during prepping a node, it should ask for proxy information so the tasks like Downloading Platform9 installers etc. are using the proxy.

For Mavenir, we are working around this today by editing the following tasks.

i) vi pf9/pf9-venv/lib/python2.7/site-packages/pf9/express/roles/pf9-hostagent/tasks/classic-hostagent-setup.yml

- name: Download Platform9 installers
  script: files/pf9_get_hostagent.py --account_endpoint "{{du_fqdn}}" --region "{{du_region}}" --token "{{du_token}}" --proxy http://10.1.20.57:80 --platform
 "{{ansible_os_family|lower}}"
  args:
    chdir: /tmp
    executable: "{{ ansible_python.executable }}"
    register: agent_install
  when: proxy_url is undefined
- name: Download Platform9 installers
  script: files/pf9_get_hostagent.py --account_endpoint "{{du_fqdn}}" --region "{{du_region}}" --token "{{du_token}}" --proxy http://10.1.20.57:80 --platform
 "{{ansible_os_family|lower}}"
  args:
    chdir: /tmp
    executable: "{{ ansible_python.executable }}"
    register: agent_install
  when: proxy_url is defined
ii) vi pf9/pf9-venv/lib/python2.7/site-packages/pf9/express/roles/pf9-hostagent/tasks/classic-packages.yml
- name: set proxy variable
  set_fact:
    proxy: "{{'--proxy='+ proxy_url if proxy_url is defined else ''}}"
	 proxy: "{{' --proxy=http://10.1.20.57:80 ' }}"

we already have a provision for proxy information in pf9-express in express.conf located at - <working_dir>/pf9/db.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions