Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

WIP: initial working tests #3

Closed

Conversation

baloo42
Copy link
Collaborator

@baloo42 baloo42 commented Mar 24, 2020

I got it to work on my machines (ubuntu 16.04 + ubuntu 18.04). Next step should be to get it working in Zuul. As LXD is harder to install in CentOS/Fedora than in Ubuntu, I would start with Ubuntu and extend the pipelines in another PR for CentOS/Fedora.

PR Goal: Implement a full integration test with ubuntu in zuul.

@baloo42
Copy link
Collaborator Author

baloo42 commented Mar 24, 2020

In ubuntu you have to prepare LXD in the following way:

- name: Install LXD as a snap
  shell: snap install lxd
  register: _snap_install_result
  changed_when: not(_snap_install_result.stderr is search('already installed'))

- name: Set fact for LXD preseed config
  set_fact:
    _lxd_preseed_config:
      config: {}
      cluster: null
      networks:
        - name: lxdbr0
          config:
            ipv4.address: auto
            ipv6.address: none
          description: ""
          managed: true
          type: ""
      storage_pools:
        - config: {}
          description: ""
          name: default
          driver: dir
      profiles:
        - name: default
          config: {}
          description: ""
          devices:
            eth0:
              name: eth0
              nictype: bridged
              parent: lxdbr0
              type: nic
            root:
              path: /
              pool: default
              type: disk

- name: Create LXD preseed file
  copy:
    content: "{{ _lxd_preseed_config | to_nice_yaml }}"
    dest: /tmp/lxd-preseed.yml
  register: _lxd_preseed_file_result

- name: Configure LXD with preseed file
  shell: cat /tmp/lxd-preseed.yml | lxd init --preseed
  when: _lxd_preseed_file_result is changed

@ssbarnea :

  • Can we use this in some way to bootstrap a ubuntu instance in zuul?
  • Can you explain how it is planned to run the scenarios molecule_xyz/scenarios/driver/xyz/molecule/{default,multi-node}?
  • I assumed, the job molecule-tox-py36-ubuntu-bionic will run on ubuntu. Is this wrong?

@ssbarnea
Copy link
Member

Ping me on irc when ready.

@ssbarnea ssbarnea added the help wanted Extra attention is needed label Oct 10, 2020
@ssbarnea ssbarnea closed this Mar 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants