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

feat: add snap support #436

Merged
merged 8 commits into from
Sep 22, 2021
Merged

Conversation

MonicaisHer
Copy link
Contributor

@MonicaisHer MonicaisHer commented Sep 17, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-ui-go/blob/master/.github/Contributing.md.

What is the current behavior?

Issue Number:

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

New Imports

  • Yes
  • No

Specific Instructions

Snap test guideline:

Reminder:
  • Do not give names in UI with blank space, better with CamelCase. Blank space will have problems when using REST API
  • Make sure all buildings as below install within 1 hour, make sure no other snaps or packages are using Redis server, for example, nmap
Download edgex-ui and snapcraft it:
$ git clone https://github.com/MonicaisHer/edgex-ui-go.git
$ cd edgex-ui-go
$ git checkout add-snap
$ cd snap/local/runtime-helpers/bin
$ chmod u+x edgex-ui-wrapper.sh
$ snap install snapcraft
$ sudo snap install multipass
$ cd /edgex-ui-go  
$ snapcraft 

About 4 minutes, we should see:

Snapped edgex-ui_1.0_amd64.snap
Install edgex-ui snap and edgexfoundry snap:
$ sudo snap remove --purge edgexfoundry
$ sudo snap install edgexfoundry --channel=2.0
$ snap install edgex-ui_1.0_amd64.snap --dangerous

After these steps, edgex-ui and edgexfoundry will automatically running

Check:
$ snap services

we should see:

Service                                    Startup   Current   Notes
edgex-ui.edgex-ui                          enabled   active    -
edgexfoundry.app-service-configurable      enabled   active    -
edgexfoundry.consul                        enabled   active    -
edgexfoundry.core-command                  enabled   active    -
edgexfoundry.core-data                     enabled   active    -
edgexfoundry.core-metadata                 enabled   active    -
edgexfoundry.device-virtual                enabled   active    -
edgexfoundry.kong-daemon                   enabled   active    -
edgexfoundry.kuiper                        enabled   active    -
edgexfoundry.postgres                      enabled   active    -
edgexfoundry.redis                         enabled   active    -
edgexfoundry.security-bootstrapper-redis   enabled   inactive  -
edgexfoundry.security-consul-bootstrapper  enabled   inactive  -
edgexfoundry.security-proxy-setup          enabled   inactive  -
edgexfoundry.security-secretstore-setup    enabled   inactive  -
edgexfoundry.support-notifications         enabled   active    -
edgexfoundry.support-scheduler             enabled   active    -
edgexfoundry.sys-mgmt-agent                disabled  inactive  -
edgexfoundry.vault                         enabled   active    -
Configure edgexfoundry:
$ snap set edgexfoundry device-virtual=on
$ sudo snap set edgexfoundry support-scheduler=on
$ sudo snap set edgexfoundry support-notifications=on

When we use Edgex UI work for streams, there is a problem of 502 Bad gateway. Because the Rest API of eKuiper in EdgeX uses port 59720 instead of the default 9081. So please change 9081 to 59720:

$ cd /var/snap/edgexfoundry/current/kuiper/etc
$ sudo nano kuiper.yaml

Chang: restPort: 9081
To: restPort: 59720

$ snap set edgexfoundry kuiper=on
$ sudo snap restart edgexfoundry.kuiper
Use edgex-ui:

Open this in your brower: http://localhost:4000
We should see this:img

Other information

@MonicaisHer MonicaisHer changed the title feat: add snap feat: add snap support Sep 20, 2021
bnevis-i and others added 6 commits September 20, 2021 15:51
Closes edgexfoundry#369

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](pelletier/go-toml@v1.9.3...v1.9.4)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
- add initial files from Ian Johnson's branch
- add `go mod tidy` in part:edgex-ui
- update snap build to use go 1.16
- delete go build from source

Signed-off-by: MonicaisHer <beilimengmeng@gmail.com>
add missing config path to edgex-ui-wrapper.sh

Signed-off-by: MonicaisHer <beilimengmeng@gmail.com>
-remove deprecated version-script
-update version to 1.0
-update summary and description
-add icon
-add epoch
-remove architectures: armhf and i386

Signed-off-by: MonicaisHer <beilimengmeng@gmail.com>
Signed-off-by: Huaqiao Zhang <huaqiaoz@vmware.com>
update config path for solving 404 page not found issue

Signed-off-by: MonicaisHer <beilimengmeng@gmail.com>
Copy link
Member

@badboy-huaqiao badboy-huaqiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, next time please do rebase operation before submitting PR

@badboy-huaqiao badboy-huaqiao merged commit a8de897 into edgexfoundry:main Sep 22, 2021
@MonicaisHer
Copy link
Contributor Author

LGTM, next time please do rebase operation before submitting PR

Thank you, I will do it next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants