snowplow / dataflow-runner

Run templatable playbooks of Hadoop/Spark/et al jobs on Amazon EMR
http://snowplowanalytics.com
19 stars 8 forks source link

Development environment build issues with peru and go-bindata and wine #62

Closed davehowell closed 2 years ago

davehowell commented 4 years ago

I'm trying to set up the dev environment and ran into some errors running vagrant up and Make.

I'm running macOS Mojave version 10.14.6

Issues:

  1. peru version

    • latest peru version now wants python >=3.5, Ubuntu/trusty has 3.4.3
  2. go-bindata

    • This line in the Makefile fails: go get -u github.com/go-bindata/go-bindata/...
  3. build errors related to wine public key can't be verified

Details & fixes


Peru

When trying to run vagrant up && vagrant ssh the up.bash script fails with

"/tmp/pip_build_root/peru/setup.py", line 39, in get_install_requires
     default:         raise RuntimeError('The minimum supported Python version is 3.5.')

It is not advisable to update Ubuntu's system python, it is also probably not worth trying to update the Ubuntu version itself

The easiest thing to do is pin the peru version. I've tested this works in dataflow-runner/vagrant/up.bash ln16 `sudo pip3 install 'peru==1.1.4'

go-bindata

The error is:

package github.com/go-bindata/go-bindata/v3: cannot find package "github.com/go-bindata/go-bindata/v3" in any of:
    /usr/local/share/go/src/github.com/go-bindata/go-bindata/v3 (from $GOROOT)
    /opt/gopath/src/github.com/go-bindata/go-bindata/v3 (from $GOPATH)

The easiest way to fix this is use a newer version of golang that supports modules (>=v1.11) I see the oss-playbooks already has newer golang versions including 1.13.5

I have tested this works by editing dataflow-runner/vagrant/up.playbooks oss-playbooks/golang-1.13.5.yml

wine

The error is:

    default: TASK: [wine | Wine | Install Wine and all Dependencies] ***********************
    default: changed: [127.0.0.1] => (item=dpkg --add-architecture i386)
    default: changed: [127.0.0.1] => (item=wget -nc https://dl.winehq.org/wine-builds/Release.key)
    default: changed: [127.0.0.1] => (item=apt-key add Release.key)
    default: changed: [127.0.0.1] => (item=apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/)
    default: changed: [127.0.0.1] => (item=apt-get update)
    default: failed: [127.0.0.1] => (item=apt-get install -y winehq-stable) => {"changed": true, "cmd": ["apt-get", "install", "-y", "winehq-stable"], "delta": "0:00:01.036432", "end": "2020-04-14 17:44:04.017700", "item": "apt-get install -y winehq-stable", "rc": 100, "start": "2020-04-14 17:44:02.981268"}
    default: stderr: E: There are problems and -y was used without --force-yes

and then

GPG error: https://dl.winehq.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

I ran the following in the vagrant ssh session and it sucessfully updated the public key; I could then run vagrant provision again and the full vm build completed successfully

wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt update

This is noted on the WineHQ wiki:

The WineHQ repository key was changed on 2018-12-19. If you downloaded and added the key before that time, you will need to download and add the new key and run sudo apt update to accept the repository changes.

davehowell commented 4 years ago

This is addressed in https://github.com/snowplow/dataflow-runner/pull/63 as well as in the other PR's to the ansible-playbooks repo linked above

oguzhanunlu commented 2 years ago

Closing as vagrant setup is removed in #53