Hi @Hoang_Khang ,
Welcome to Snowplow community !
Could you try again after replacing these lines with these lines:
/usr/local/go/bin/go get github.com/BurntSushi/toml /usr/local/go/bin/go get gopkg.in/pg.v5 /usr/local/go/bin/go get github.com/trustelem/zxcvbn /usr/local/go/bin/go get golang.org/x/crypto/bcrypt
and share the error please ?
Here’s how I addressed it:
- Because the README in GitHub - BurntSushi/toml: TOML parser for Golang with reflection. states:
This library requires Go 1.13 or newer;
go_tarball: "go1.13.15.linux-amd64.tar.gz" go_tarball_checksum: "sha256:01cc3ddf6273900eba3e2bf311238828b7168b822bb57a9ccab4d7aa2acd6028" go_version_target: "go version go1.13.15 linux/amd64" set_go_path: true
(We can probably go higher but I didn’t want to risk introducing issues with other GO deps so, I figured going with the minimal required version is best for now.
go get github.com/BurntSushi/toml@latestwill fail with
go: cannot use path@version syntax in GOPATH modeotherwise)
/usr/local/go/bin/go get github.com/BurntSushi/toml
/usr/local/go/bin/go get github.com/BurntSushi/toml@latest
This made the
sp_mini_3_build_go_projects tasks succeed.
Like I said, perhaps an upgrade to a more recent GO version should be considered…
If the official maintainers find this fix acceptable, I am happy to submit a pull request to the GitHub - snowplow/snowplow-mini: An easily-deployable, single-instance version of Snowplow repo.
Also, is there a reason for the
do echo "$REPO"; sleep 1; done bit? In this case, it made
ansible-playbook hang as it was stuck in an infinite loop but, regardless, I’m wondering as to the reason these loops were put there?
Thanks for the offer @Jesse_Portnoy ! We are actually working on next Mini release that will have quite some refactoring in it, e.g.
apt install golang-go will be used instead of all these manual steps.
Like you I can’t find a reason for this.
Hi @BenB ,
Glad to hear you’re working on a new release:)
I have a few suggestions I’d like to share (perhaps you already considered these but there’s no harm in mentioning them):
- I absolutely agree that it would be best to obtain
golangfrom an APT repo; I presume the reason you’ve taken the current route for deploying
golangis because the version for the package in the official repo for Ubuntu 18.04 is 1.10, which is rather old. I’d recommend enabling the
# add-apt-repository ppa:longsleep/golang-backports # apt-cache policy golang golang: Installed: 2:1.10~4ubuntu1 Candidate: 2:1.20~1longsleep1 Version table: 2:1.20~1longsleep1 500 500 http://ppa.launchpad.net/longsleep/golang-backports/ubuntu bionic/main amd64 Packages 2:1.14-1longsleep1+bionic 500 500 http://ppa.launchpad.net/longsleep/golang-backports/ubuntu bionic/main amd64 Packages 2:1.13~1longsleep1+xenial 500 500 http://ppa.launchpad.net/longsleep/golang-backports/ubuntu bionic/main amd64 Packages *** 2:1.10~4ubuntu1 500 500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status
This will give you a selection of several versions as the output denotes and would work well if you decide to upgrade to a different Ubuntu image.
- I noticed that there are quite a few literal references to
/home/ubuntuin your Ansible files but that you have already thought of setting a variable for the prefix in
I’d suggest using that rather than these hardcoded paths and perhaps also rename it to
prefix to make it a bit easier to understand
- I know that this setup is only intended for dev/evaluation purposes but I think it would be nice to create a dedicated system user for the app (say
snowplow) rather than use the default
ubuntuone. This would allow one to use the Ansible playbook in other constellations and APT based distros (like Debian, my own choice) without having to make significant changes and would also contribute towards a better isolation of the app
Hi @Jesse_Portnoy , I followed your advice, thank you!
Hi @hai_nam_hoang ,
I’m currently preparing next release on this branch. I’m still at the testing step no it might not all work well yet, but feel free to try it already.
Hi @BenB , I hope you can make a detailed video tutorial on how to install this. This is a homework assignment that my teacher assigned to me, and if I don’t complete it soon, I might die .
In case you missed it, Snowplow Mini 0.17.0 has been released.
For sure that would be great! We’re thinking about ways to improve and simplify Mini, so for now we didn’t want to spend time to do this change yet.