Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claw-playbook: Update to fully support Ubuntu 18.04 'Bionic Beaver' #848

Open
cferthorney opened this issue Jun 21, 2018 · 15 comments

Comments

Projects
None yet
8 participants
@cferthorney
Copy link

commented Jun 21, 2018

Related to #842

Once a pull-request has been committed for #842 has been committed, there needs to be some deb name updates to reflect the fact that Ubuntu 18.04 has renamed some packages. Examples include php7.0-common to php-common.

It is also anticipated that some ansible when clauses will be required to detect when ubuntu/bionic64 is being used.

@cferthorney cferthorney changed the title Update Islandora-Devops/claw-playbook to fully support Ubuntu 18.04 'Bionic Beaver' Claw-playbook: Update to fully support Ubuntu 18.04 'Bionic Beaver' Jun 21, 2018

@dannylamb

This comment has been minimized.

Copy link

commented Jun 21, 2018

Thanks for this. I'm definitely 👍 to supporting the latest ubuntu LTS.

@Natkeeran Natkeeran added the Ansible label Jun 26, 2018

@dannylamb

This comment has been minimized.

Copy link

commented Jan 10, 2019

Linking to #950, I definitely want to ship with the latest LTS.

@ruebot

This comment has been minimized.

Copy link

commented Jun 28, 2019

I can take this one if y'all want.

@ruebot

This comment has been minimized.

Copy link

commented Jun 28, 2019

I guess a larger question here as I'm working on it, is do y'all just want to move to 18.04 or support 16.04 and 18.04 at the same time? If it is the latter things are gonna get really complicated. It's definitely doable, but will be awful to support and maintain. Maybe just move to 18.04?

@ruebot

This comment has been minimized.

Copy link

commented Jun 28, 2019

We need to update the imagemagick ppa to 18.04. Bit of irc discussion here. Happy to do this work as well.

@dannylamb

This comment has been minimized.

Copy link

commented Jun 28, 2019

Moving up to 18.04 was something I wanted to do pre-release but there just wasn't enough time. I'd prefer to just move to 18.04, but Im brutal and want to maintain as little as possible.

@whikloj

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

I'd say move, this is a demo/development box.

If you are installing this on your server you can setup whatever OS you want.

@Natkeeran

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2019

Running into the following issue on ubuntu 18:

failed: [other_stack] (item=[u'cmake', u'libpng16-dev', u'libtiff-dev', u'liblcms2-dev']) => {"ansible_loop_var": "item", "changed": false, "item": ["cmake", "libpng16-dev", "libtiff-dev", "liblcms2-dev"], "msg": "No package matching 'libpng16-dev' is available"}
@seth-shaw-unlv

This comment has been minimized.

Copy link

commented Jul 2, 2019

@Natkeeran I think 'libpng16-dev' is now just 'libpng-dev'.

@ruebot

This comment has been minimized.

Copy link

commented Jul 2, 2019

That's what I updated in my branch last week. Won't get back to working on it until Friday (July 4th) at the earliest.

The next place the build breaks down is what I mentioned above with the imagemagick ppa. I had planned on getting back to that on Friday, but if y'all need it sooner, feel free to assign it to somebody else.

@irfanrahman

This comment has been minimized.

Copy link

commented Jul 3, 2019

Maybe this will help, this works on both Ubuntu 16/18LTS with Ansible 2.8.1

this was my solution for Islandora8 once I found Lyrasis's PPA not working.
ImageMagic source with module support

fine_name: imagemagick_from_src.yml

`- name: Compile ImageMagic from source
hosts: localhost
vars:
local_src_dir: "/usr/local/src/"
imagemagick_version: ImageMagick-7.0.8-51
imagemagick_tarball_url: "https://imagemagick.org/download/{{ imagemagick_version }}.tar.gz"
imagemagick_src_dir: "/usr/local/src/{{ imagemagick_version }}"

tasks:

  • name: Installing ImageMagic Dependencies
    become: yes
    apt:
    name: ['pkg-config', 'libopenjp2-tools', 'libopenjp2-7-dev', 'libjpeg-dev', 'libpng-dev', 'libtiff-dev', 'libraw-dev', 'unzip', 'python-apt', 'libltdl7', 'libltdl-dev', 'libghc-bzlib-dev', 'libxml2-dev']
    update_cache: yes

  • name: Go to the local SRC folder and update LDConfig
    command: chdir=/usr/local/src/ ls
    command: ldconfig /usr/local/lib

  • name: Downloading ImageMagic source
    become: yes
    get_url:
    url: "{{ imagemagick_tarball_url }}"
    dest: "/usr/local/src/{{ imagemagick_version }}.tar.gz"
    register: imagemagick_source

  • name: Unpacking ImageMagic
    become: yes
    unarchive:
    copy: yes
    dest: /usr/local/src/
    src: "{{ imagemagick_source.dest }}"
    when: imagemagick_source.changed
    register: imagemagick_source_unpack

  • name: Configuring ImageMagic source with module support
    command: "./configure --with-modules --enable-shared"
    args:
    chdir: "{{ imagemagick_src_dir }}"
    when: imagemagick_source_unpack.changed
    register: imagemagick_configure

  • name: Installing ImageMagic
    become: yes
    shell: make && make install
    args:
    chdir: "{{ imagemagick_src_dir }}"
    when: imagemagick_configure.changed

  • name: Update LDConfig
    command: ldconfig /usr/local/lib
    `

@Natkeeran

This comment has been minimized.

Copy link
Collaborator

commented Jul 4, 2019

@jonathangreen Any plans to provide a repo for bionic similar to http://ppa.launchpad.net/lyrasis/imagemagick-jp2/ubuntu/dists/ ?

@jonathangreen

This comment has been minimized.

Copy link

commented Jul 4, 2019

IRC discussion from here:
https://logs.woh.ca/islandora/2019-06-28#1561735682-1561736848

15:29 <ruebot> jonathangee: https://launchpad.net/~lyrasis/+archive/ubuntu/imagemagick-jp2 -- can you add bionic (18.04)? 
15:29 <ruebot> jonathangee: or was that just a workaround for 16.04? 
15:31 <jonathangee> ruebot: so it is a work around, due to imagemagick in 16.04 not being compiled with jp2 support by default. it wasn't compiled with jp2 support because libjp2(?) wasn't accepted into the cannonical repositories over some security audit issues. 
15:32 <ruebot> jonathangee: ah! 
15:32 <jonathangee> ruebot: there was a ticket to pull in jp2 support when they could, so it owuld be worth checking if 18.04 is compiled with jp2 support 
15:32 <jonathangee> ruebot: if its not then we'll have to build a package for it 
15:32 <jonathangee> ruebot: let me see if i can find my notes, i think i have some links to the relevant tickets 
15:34 <ruebot> jonathangee: cool. checking on the vagrant/ansible machine now with 18.04. 
15:37 <ruebot> jonathangee: doesn't look like it is there by default so far. 
15:38 <jonathangee> ruebot: yah launchpad ticket is here 
15:38 <jonathangee> ruebot: https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1447968 
15:38 <ruebot> https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1447968/comments/7 
15:38 <ruebot> jinx 
15:38 <jonathangee> haha 
15:39 <ruebot> jonathangee: looks like we'll need the package then, right? 
15:40 <jonathangee> ruebot: yah i think thats the easiest thing to do. i can add one to that ppa when i have time. the package building process isn't always the easiest, but i think this one wasn't too bad. 
15:41 <jonathangee> ruebot: I'm not sure i'm going to have time for a little bit to look into it. If you wanted to try to build a package I can give you access to push it into that PPA. 
15:41 <ruebot> jonathangee: sure. i can give it a shot. 
15:42 <ruebot> jonathangee: is there a git repo for it, or is it all from scrach? 
15:44 <jonathangee> ruebot: I should write some documentation on this, so i remember for next time, but if I remember correctly. I pulled down the package manifest for the existing xenial package, then added the dependancies i needed and then rebuilt the package. 
15:44 <jonathangee> I think all it needed was to have the jp2 lib available 
15:45 <ruebot> jonathangee: cool. i'll dig in more here in a bit. if i can't get it sorted today, i'll get back to it next friday when i'm at york again. 
15:47 <jonathangee> ruebot: 👍🏻 lemme know if you run into any roadblocks i can help with 

@Natkeeran I don't have time at the moment to work on it, but if anyone wants to push a package to that PPA they are more than welcome to and I can provide access, or maybe we should create a Islandora PPA to install from. @ruebot I believe is going to work making the package when he has the bandwidth to work on it.

We could also install from source as mentioned earlier in this thread. I personally am not the hugest fan of doing that within playbooks, since you have to manager versions and make sure things are idempotent and it makes the playbook run longer as you have to do the compile. It is however possible, and might be the easiest thing to do here.

ruebot added a commit to yorkulibraries/claw-playbook that referenced this issue Jul 12, 2019

Update to 18.04
- Update Vagrantfile to use 18.04 for Ubuntu builds
- Tweak package names, and required packages for 18.04
- Updates to get rid of some deprecation warnings
- Addresses Islandora-CLAW/CLAW#848
- Requires Islandora-Devops/ansible-role-grok#6
@ruebot

This comment has been minimized.

Copy link

commented Jul 12, 2019

@ruebot

This comment has been minimized.

Copy link

commented Jul 12, 2019

convert still crashes on jp2 conversion with the most recent version of imagemagick I have up on the PPA.

Technically everything is there, but it still crashes 😢

vagrant@claw:/tmp$ convert yul_99144_OBJ_Datastream.tiff test.jp2
Aborted (core dumped)

vagrant@claw:/tmp$ convert -list format | grep -i JP2
      J2C* JP2       rw-   JPEG-2000 Code Stream Syntax (2.3.0)
      J2K* JP2       rw-   JPEG-2000 Code Stream Syntax (2.3.0)
      JP2* JP2       rw-   JPEG-2000 File Format Syntax (2.3.0)
      JPC* JP2       rw-   JPEG-2000 Code Stream Syntax (2.3.0)
      JPM* JP2       rw-   JPEG-2000 Code Stream Syntax (2.3.0)
      JPT* JP2       rw-   JPEG-2000 File Format Syntax (2.3.0)

I'll dig back in on the 19th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.