The Vagrantfile and the playbooks are out of date and cannot be used in their current form.
The PoCs feature was a good idea, but apparently it wasn't used since the introduction and was not properly maintained to keep it working. For the most part our CI scripts are the most up to date materialized build and testing instructions. And so, they can be used as a guide when necessary. Instead of trying to fix it, let's delete the broken code, as there seem to be no demand for it. The functionality is purely internal and only for development purposes, so should not have any effect on the end users. Signed-off-by: Ilya Maximets <[email protected]> --- Documentation/topics/testing.rst | 57 ---------------- Makefile.am | 4 -- poc/builders/Vagrantfile | 45 ------------- poc/playbook-centos-builder.yml | 100 --------------------------- poc/playbook-fedora-builder.yml | 112 ------------------------------- poc/playbook-ubuntu-builder.yml | 70 ------------------- 6 files changed, 388 deletions(-) delete mode 100644 poc/builders/Vagrantfile delete mode 100644 poc/playbook-centos-builder.yml delete mode 100644 poc/playbook-fedora-builder.yml delete mode 100644 poc/playbook-ubuntu-builder.yml diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst index 117b6b120..20c30eb6c 100644 --- a/Documentation/topics/testing.rst +++ b/Documentation/topics/testing.rst @@ -534,60 +534,3 @@ suitability of different vSwitch implementations in a telco deployment environment. More information can be found on the `Anuket project wiki`_. .. _Anuket project wiki: https://wiki.anuket.io/display/HOME/ViNePERF - -Proof of Concepts -~~~~~~~~~~~~~~~~~ - -Proof of Concepts are documentation materialized into Ansible recipes -executed in VirtualBox or Libvirt environments orchestrated by Vagrant. -Proof of Concepts allow developers to create small virtualized setups that -demonstrate how certain Open vSwitch features are intended to work avoiding -user introduced errors by overlooking instructions. Proof of Concepts -are also helpful when integrating with thirdparty software, because standard -unit tests with make check are limited. - -Vagrant by default uses VirtualBox provider. However, if Libvirt is your -choice of virtualization technology, then you can use it by installing Libvirt -plugin:: - - $ vagrant plugin install vagrant-libvirt - -And then appending ``--provider=libvirt`` flag to vagrant commands. - -The host where Vagrant runs does not need to have any special software -installed besides vagrant, virtualbox (or libvirt and libvirt-dev) and -ansible. - -The following Proof of Concepts are supported: - -Builders -++++++++ - -This particular Proof of Concept demonstrates integration with Debian and RPM -packaging tools:: - - $ cd ./poc/builders - $ vagrant up - -Once that command finished you can get packages from ``/var/www/html`` -directory. Since those hosts are also configured as repositories then -you can add them to ``/etc/apt/sources.list.d`` or ``/etc/yum.repos.d`` -configuration files on another host to retrieve packages with yum or -apt-get. - -When you have made changes to OVS source code and want to rebuild packages -run:: - - $ git commit -a - $ vagrant rsync && vagrant provision - -Whenever packages are rebuilt the Open vSwitch release number increases -by one and you can simply upgrade Open vSwitch by running ``yum`` or -``apt-get`` update commands. - -Once you are done with experimenting you can tear down setup with:: - - $ vagrant destroy - -Sometimes deployment of Proof of Concept may fail, if, for example, VMs -don't have network reachability to the Internet. diff --git a/Makefile.am b/Makefile.am index cdcc4e9bd..f01887516 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,10 +91,6 @@ EXTRA_DIST = \ .readthedocs.yaml \ appveyor.yml \ boot.sh \ - poc/builders/Vagrantfile \ - poc/playbook-centos-builder.yml \ - poc/playbook-fedora-builder.yml \ - poc/playbook-ubuntu-builder.yml \ $(MAN_FRAGMENTS) \ $(MAN_ROOTS) \ Vagrantfile \ diff --git a/poc/builders/Vagrantfile b/poc/builders/Vagrantfile deleted file mode 100644 index 9edc468a3..000000000 --- a/poc/builders/Vagrantfile +++ /dev/null @@ -1,45 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -VAGRANTFILE_API_VERSION = "2" - -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.ssh.insert_key = false - - # Centos-7.4 builder host - config.vm.define "centosbuilder" do |builder| - builder.vm.hostname = "centosbuilder.dev" - builder.vm.box = "centos/7" - builder.vm.synced_folder "../../", "/git/ovs", type: "rsync", - rsync__args: ["--archive", "--delete", "-z"] - builder.vm.provision "builder", type: "ansible" do |ansible| - ansible.playbook = "../playbook-centos-builder.yml" - ansible.sudo = true - end - end - - # Ubuntu-16.04 builder host - config.vm.define "ubuntubuilder" do |builder| - builder.vm.hostname = "ubuntubuilder.dev" - builder.vm.box = "generic/ubuntu1604" - builder.vm.synced_folder "../../", "/git/ovs", type: "rsync", - rsync__args: ["--archive", "--delete", "-z"] - builder.vm.provision "builder", type: "ansible" do |ansible| - ansible.playbook = "../playbook-ubuntu-builder.yml" - ansible.sudo = true - end - end - - # Fedora builder host - config.vm.define "fedorabuilder" do |builder| - builder.vm.hostname = "fedoraubuilder.dev" - builder.vm.box = "fedora/27-cloud-base" - builder.vm.synced_folder "../../", "/git/ovs", type: "rsync", - rsync__args: ["--archive", "--delete", "-z"] - builder.vm.provision "builder", type: "ansible" do |ansible| - ansible.playbook = "../playbook-fedora-builder.yml" - ansible.sudo = true - end - end - -end diff --git a/poc/playbook-centos-builder.yml b/poc/playbook-centos-builder.yml deleted file mode 100644 index b38a6c4ef..000000000 --- a/poc/playbook-centos-builder.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -- hosts: all - become: true - name: builder - tasks: - - - name: Create Ansible Local Facts Directory - file: path=/etc/ansible/facts.d state=directory - - - name: Initiate Build Numbering - copy: - content: '{ "release":"1" }' - dest: "/etc/ansible/facts.d/builder.fact" - force: no - - - name: Set source directory for building - set_fact: - SOURCE: "/root/rpmbuild/SOURCES" - - - name: Reload Ansible Local Facts - setup: filter=ansible_local - - - name: Install "yum-utils", "rpmdevtools", "createrepo", "httpd", "git" - yum: update_cache=yes name={{item}} state=present - with_items: - - yum-utils - - rpmdevtools - - createrepo - - httpd - - git - - - name: Remove untracked files from Open vSwitch GIT repository - command: chdir=/git/ovs/ git clean -xdf - - - name: Reset Open vSwitch GIT repository to last comitted state - command: chdir=/git/ovs/ git reset --hard - - - name: Generate spec files for easy build dependency retrieval - shell: sed -e 's/@VERSION@/0.0.1/' {{item}}.in > /tmp/{{item}} - args: - chdir: /git/ovs/rhel - with_items: - - openvswitch.spec - - - name: Install build dependencies specified from spec files - shell: echo "y" | yum-builddep /tmp/{{item}} - with_items: - - openvswitch.spec - - - name: Create rpm dev tree - command: rpmdev-setuptree - - - name: Run "./boot.sh" - command: chdir=/git/ovs/ ./boot.sh - - - name: Run "./configure" - command: chdir=/git/ovs/ ./configure - - - name: Run "make dist" - command: chdir=/git/ovs/ make dist - - - name: Parse out Open vSwitch version from "configure.ac" - command: chdir=/git/ovs autoconf -t AC_INIT:'$2' - register: version - - - name: Copy source tarball to rpm dev tree - command: cp /git/ovs/openvswitch-{{version.stdout}}.tar.gz {{SOURCE}} - - - name: Unarchive openvswitch source tarball - unarchive: - src: "{{SOURCE}}/openvswitch-{{version.stdout}}.tar.gz" - dest: "{{SOURCE}}" - remote_src: yes - - - name: Update release number in spec files - lineinfile: - path: "{{SOURCE}}/openvswitch-{{version.stdout}}/rhel/{{item}}" - regexp: '^Release:' - line: "Release: {{ ansible_local.builder.release }}" - with_items: - - openvswitch.spec - - - name: Build Open vSwitch user space rpms - command: rpmbuild -bb --without check rhel/openvswitch.spec - args: - chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}" - - - name: Copy RPM packages to /var/www/html - command: cp -r /root/rpmbuild/RPMS/ /var/www/html - - - name: Create RPM Package index file for repository - command: chdir=/var/www/html createrepo /var/www/html - - - name: Make sure Apache is running - systemd: state=started name=httpd - - - name: Bump up Build Number - copy: - content: '{ "release":"{{ansible_local.builder.release|int+1}}" }' - dest: "/etc/ansible/facts.d/builder.fact" diff --git a/poc/playbook-fedora-builder.yml b/poc/playbook-fedora-builder.yml deleted file mode 100644 index 67736a1b4..000000000 --- a/poc/playbook-fedora-builder.yml +++ /dev/null @@ -1,112 +0,0 @@ ---- -- hosts: all - become: true - name: builder - - gather_facts: false - pre_tasks: - - - name: Install python2 for Ansible - raw: bash -c "test -e /usr/bin/python || (dnf -y install python2)" - register: output - changed_when: output.stdout != "" - - - name: Gathering Facts - setup: - - tasks: - - name: Create Ansible Local Facts Directory - file: path=/etc/ansible/facts.d state=directory - - - name: Install "yum-utils", "rpmdevtools", "createrepo", "httpd", "git" - dnf: name={{item}} state=present - with_items: - - yum-utils - - rpmdevtools - - createrepo - - httpd - - git - - libselinux-python - - - name: Initiate Build Numbering - copy: - content: '{ "release":"1" }' - dest: "/etc/ansible/facts.d/builder.fact" - force: no - - - name: Set source directory for building - set_fact: - SOURCE: "/root/rpmbuild/SOURCES" - - - name: Reload Ansible Local Facts - setup: filter=ansible_local - - - name: Remove untracked files from Open vSwitch GIT repository - command: chdir=/git/ovs/ git clean -xdf - - - name: Reset Open vSwitch GIT repository to last comitted state - command: chdir=/git/ovs/ git reset --hard - - - name: Generate spec files for easy build dependency retrieval - shell: sed -e 's/@VERSION@/0.0.1/' {{item}}.in > /tmp/{{item}} - args: - chdir: /git/ovs/rhel - with_items: - - openvswitch-fedora.spec - - - name: Install build dependencies specified from spec files - shell: echo "y" | yum-builddep /tmp/{{item}} - with_items: - - openvswitch-fedora.spec - - - name: Create rpm dev tree - command: rpmdev-setuptree - - - name: Run "./boot.sh" - command: chdir=/git/ovs/ ./boot.sh - - - name: Run "./configure" - command: chdir=/git/ovs/ ./configure - - - name: Run "make dist" - command: chdir=/git/ovs/ make dist - - - name: Parse out Open vSwitch version from "configure.ac" - command: chdir=/git/ovs autoconf -t AC_INIT:'$2' - register: version - - - name: Copy source tarball to rpm dev tree - command: cp /git/ovs/openvswitch-{{version.stdout}}.tar.gz {{SOURCE}} - - - name: Unarchive openvswitch source tarball - unarchive: - src: "{{SOURCE}}/openvswitch-{{version.stdout}}.tar.gz" - dest: "{{SOURCE}}" - remote_src: yes - - - name: Update release number in spec files - lineinfile: - path: "{{SOURCE}}/openvswitch-{{version.stdout}}/rhel/{{item}}" - regexp: '^Release:' - line: "Release: {{ ansible_local.builder.release }}" - with_items: - - openvswitch-fedora.spec - - - name: Build Open vSwitch user space rpms - command: rpmbuild -bb --without check rhel/openvswitch-fedora.spec - args: - chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}" - - - name: Copy RPM packages to /var/www/html - command: cp -r /root/rpmbuild/RPMS/ /var/www/html - - - name: Create RPM Package index file for repository - command: chdir=/var/www/html createrepo /var/www/html - - - name: Make sure Apache is running - systemd: state=started name=httpd - - - name: Bump up Build Number - copy: - content: '{ "release":"{{ansible_local.builder.release|int+1}}" }' - dest: "/etc/ansible/facts.d/builder.fact" diff --git a/poc/playbook-ubuntu-builder.yml b/poc/playbook-ubuntu-builder.yml deleted file mode 100644 index 5a13c6069..000000000 --- a/poc/playbook-ubuntu-builder.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -- hosts: all - become: true - name: builder - gather_facts: no - pre_tasks: - - name: 'install python2' - raw: sudo apt-get -y install python-simplejson - tasks: - - - name: Create Ansible Local Facts Directory - file: path=/etc/ansible/facts.d state=directory - - - name: Initiate Build Numbering - copy: - content: '{ "release":"1" }' - dest: "/etc/ansible/facts.d/builder.fact" - force: no - - - name: Reload Ansible Local Facts - setup: filter=ansible_local - - - name: Install "devscripts", "equivs", "apache2", "autoconf" - apt: update_cache=yes name={{item}} state=present - with_items: - - devscripts - - equivs - - apache2 - - autoconf - - - name: Remove untracked files from Open vSwitch GIT repository - command: chdir=/git/ovs/ git clean -xdf - - - name: Reset Open vSwitch GIT repository to last comitted state - command: chdir=/git/ovs/ git reset --hard - - - name: Parse out Open vSwitch version from "configure.ac" - command: chdir=/git/ovs autoconf -t AC_INIT:'$2' - register: version - - - name: Concatenate full version - set_fact: - full_version: "{{version.stdout}}-{{ansible_local.builder.release}}" - - - name: Update Open vSwitch version to {{full_version}} - command: chdir=/git/ovs/ dch -b -v {{full_version}} Vagrant Build - - - name: Build debian package with Open vSwitch build dependencies - command: chdir=/git/ovs/ mk-build-deps -B debian/control - - - name: Install Open vSwitch {{full_version}} build dependencies - apt: deb=/git/ovs/openvswitch-build-deps-depends_{{full_version}}_all.deb - - - name: Build Open vSwitch {{full_version}} debian packages - shell: DEB_BUILD_OPTIONS='nocheck' fakeroot debian/rules binary - args: - chdir: /git/ovs/ - - - name: Move debian packages to /var/www/html - shell: mv /git/*.deb /var/www/html/ - - - name: Create Debian Package index file for repository - shell: dpkg-scanpackages . | gzip -9c > Packages.gz - args: - chdir: /var/www/html - - - name: Bump up Build Number - copy: - content: '{ "release":"{{ansible_local.builder.release|int+1}}" }' - dest: "/etc/ansible/facts.d/builder.fact" -- 2.52.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
