You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.5 KiB

5 years ago
  1. Hi
  2. This PR adds support for building a snap package of seaweedfs. Snaps are cross distro Linux software packages. One snap can be installed on Ubuntu all supported LTS and non LTS releases from 14.04 onward. Additionally they can installed on Debian, Manjaro, Fedora, OpenSUSE and others. Making a snap of seaweedfs enables you to provide automatic updates on your schedule to your users via the snap store.
  3. If accepted, you can use snapcraft locally, a CI system such as travis or circle-ci, or our free build system (build.snapcraft.io) to create snaps and upload to the store (snapcraft.io/store). The store supports
  4. To test this PR locally, I used an Ubuntu 16.04 VM, with the following steps.
  5. ```
  6. snap install snapcraft --classic
  7. git clone https://github.com/popey/seaweedfs
  8. cd seaweedfs
  9. git checkout add-snapcraft
  10. snapcraft
  11. ```
  12. The generated a .snap file from the tip of master (I could have checked out a stable release instead). It can be installed with:-
  13. snap install seaweedfs_0.99+git30.79371c0-dirty_amd64.snap --dangerous
  14. (the --dangerous is necessary because we’re installing an app which hasn’t gone through the snap store review process)
  15. Once installed, the (namespaced) weed command can be executed. If you accept this and land the snap in the store, we can request an ‘alias’ so users can use the ‘weed’ command rather than the namespaced ‘seaweedfs.weed’
  16. - Run the command
  17. - Create sample config. Snaps are securely confined so their home directory is in a different place
  18. mkdir ~/snap/seaweedfs/current/.seaweedfs
  19. seaweedfs.weed scaffold > ~/snap/seaweed/current/.seaweedfs/filer.toml
  20. - Run a server
  21. seaweedfs.weed server
  22. - Run a benchmark
  23. seaweedfs.weed benchmark
  24. Results from my test run: https://paste.ubuntu.com/p/95Xk8zFQ7w/
  25. If landed, you will need to:-
  26. - Register an account in the snap store https://snapcraft.io/account
  27. - Register the ‘seaweedfs’ name in the store
  28. - snapcraft login
  29. - snapcraft register seaweedfs
  30. - Upload a built snap to the store
  31. - snapcraft push seaweedfs_0.99+git30.79371c0-dirty_amd64.snap --release edge
  32. - Test installing on a clean Ubuntu 16.04 machine
  33. - snap install seaweedfs --edge
  34. The store supports multiple risk levels as “channels” with the edge channel typically used to host the latest build from git master. Stable is where stable releases are pushed. Optionally beta and candidate channels can also be used if needed.
  35. Once you are happy, you can push a stable release to the stable channel, update the store page, and promote the application online (we can help there).