Skip to content

Commit

Permalink
feat!: Remove snap packaging (#4706)
Browse files Browse the repository at this point in the history
* feat!: Remove snap packaging

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
  • Loading branch information
farshidtz authored Oct 24, 2023
1 parent 7c01bc1 commit b52c6cf
Show file tree
Hide file tree
Showing 38 changed files with 9 additions and 1,695 deletions.
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
docs
*.snap
.git
.git
1 change: 0 additions & 1 deletion .github/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Modules:
* **core-data**: (or data) A change or addition to the core data micro service
* **core-metadata**: (or metadata or meta) A change or addition to the core metatdata micro service
* **core-command**: (or command or cmd) A change or addition to the core command micro service
* **snap**: A change or addition to snap packaging
* **docker**: A change or addition to docker packaging
* **security**: A change or addition to security micro services
* **scheduler**: A change or addition to the supporting scheduler micro service
Expand Down
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ updates:
- dependency-name: "github.com/gomodule/redigo"
# For github.com/gomodule/redigo, ignore version v2.0.0
versions: ["v2.0.0"]
- package-ecosystem: "gomod"
directory: "/snap/local/helper-go"
schedule:
interval: "daily"
1 change: 0 additions & 1 deletion .github/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ scopes:
- core-command
- command
- cmd
- snap
- docker
- security
- scheduler
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/snap.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,5 @@ docs/_build/
# log dirs
**/logs

# snap files
*.snap
*.assert
*.bz2
*.pyc
parts/*
prime/*
stage/*
snap/.snapcraft/*
squashfs-root/

# result files
fuzz_test/fuzz_results/*
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sonar.exclusions=.git/*,/bin/*,/snap/**/*,**/mocks/**/*,**/*_test.go,**/vendor/**
sonar.exclusions=.git/*,/bin/*,**/mocks/**/*,**/*_test.go,**/vendor/**
sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**
3 changes: 1 addition & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ edgeXBuildGoParallel(
testScript: 'make test',
buildScript: 'make build',
publishSwaggerDocs: true,
swaggerApiFolders: ['openapi/v3'],
buildSnap: false
swaggerApiFolders: ['openapi/v3']
)
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
EdgeX Foundry is a vendor-neutral open source project hosted by The Linux Foundation building a common open framework for IoT edge computing. At the heart of the project is an interoperability framework hosted within a full hardware- and OS-agnostic reference software platform to enable an ecosystem of plug-and-play components that unifies the marketplace and accelerates the deployment of IoT solutions. This repository contains the Go implementation of EdgeX Foundry microservices. It also includes files for building the services, containerizing the services, and initializing (bootstrapping) the services.

## Build with NATS Messaging
Currently, the NATS Messaging capability (NATS MessageBus) is opt-in at build time. This means that the published Docker images and Snaps do not include the NATS messaging capability.
Currently, the NATS Messaging capability (NATS MessageBus) is opt-in at build time. This means that the published Docker images do not include the NATS messaging capability.

The following make commands will build the local binaries or local Docker images with NATS messaging capability included for the Core and Support services.

Expand Down Expand Up @@ -58,11 +58,6 @@ Sample steps to create an access token and use the token to access EdgeX resourc

## Other installation and deployment options

### Snap Package

The components in this repository are available as a snap package.
For more details on the snap, including how to build and install it, please refer to the [snap](snap) directory.

### Native binaries

#### Prerequisites
Expand Down Expand Up @@ -95,7 +90,7 @@ make build

#### Deploy EdgeX

Recommended deployment of EdgeX services is either Docker or Snap. See [Getting Started with Docker](https://docs.edgexfoundry.org/2.0/getting-started/Ch-GettingStartedUsers/) or [Getting Started with Snap](https://docs.edgexfoundry.org/2.0/getting-started/Ch-GettingStartedSnapUsers/) for more details.
Recommended deployment of EdgeX services is with Docker. See [Getting Started with Docker](https://docs.edgexfoundry.org/2.0/getting-started/Ch-GettingStartedUsers/) for more details.

#### Hybrid for debug/testing

Expand Down Expand Up @@ -128,7 +123,7 @@ If you want to **include** the delayed start feature in the builds for these ser
INCLUDE_DELAYED_START_BUILD_CORE:="false"
```

For support services, the delayed start feature is included by default as the default behavior of them are not started right away in Snap. Similarly, you can change the default and **exclude** it by modifying the boolean flag from `true` to `false` in the Makefile:
For support services, the delayed start feature is included by default. Similarly, you can change the default and **exclude** it by modifying the boolean flag from `true` to `false` in the Makefile:

```text
INCLUDE_DELAYED_START_BUILD_SUPPORT:="true"
Expand Down
1 change: 0 additions & 1 deletion cmd/security-bootstrapper/res/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ StageGate:
# this configuration is just part of the whole go-mod-bootstrap's secret store to have
# protocol, host, and port of secretstore using in the security-bootstrapper
# we are not really using the secret store provider from go-mod-bootstrap in the code
# also this is needed as snap does not have those environments from env-files
SecretStore:
Type: vault
Protocol: http
Expand Down
2 changes: 1 addition & 1 deletion internal/security/bootstrapper/command/setupacl/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (c *cmd) Execute() (statusCode int, err error) {
}

// write a sentinel file to indicate Consul ACL bootstrap is done so that we don't bootstrap ACL again,
// this is to avoid re-bootstrapping error and that error can cause the snap crash if restart this process
// this is to avoid re-bootstrapping error
if err := c.writeSentinelFile(); err != nil {
return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to write sentinel file: %v", err)
}
Expand Down
4 changes: 1 addition & 3 deletions internal/security/bootstrapper/redis/Developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Currently, the `security-bootstrapper` configureRedis produces the ACL configuration file for Redis' default user.
Should using different ACL rules call for a debugging needs, developers could override this built-in configuration behavior as follows:

1. Currently, the default ACL file path inside the redis.conf is pointing to the path with the file name `edgex_redis_acl.conf`. A developer can always provide his own redis config file containing the different file name (eg. developer-acl.conf) for ACL rules like adding some `dangerous` commands such as `INFO, MONITOR, BGSAVE, and FLUSHD` inside his own ACL file using `+` directive. eg.:
Currently, the default ACL file path inside the redis.conf is pointing to the path with the file name `edgex_redis_acl.conf`. A developer can always provide his own redis config file containing the different file name (eg. developer-acl.conf) for ACL rules like adding some `dangerous` commands such as `INFO, MONITOR, BGSAVE, and FLUSHD` inside his own ACL file using `+` directive. eg.:

```text
user default on allkeys +@all -@dangerous #_{{.HashedRedisPwd}}_ +INFO +MONITOR +BGSAVE + FLUSHDB
Expand All @@ -20,5 +20,3 @@ Should using different ACL rules call for a debugging needs, developers could ov
Note that the HashedRedisPwd still needs to be come from the original dynamically created redis.conf file as it is read from secretstore Vault.

A developer can also just modified the ACL file `edgex_redis_acl.conf` directly and then use `ACL LOAD` or `ACL SAVE` commands to change ACL rules assuming he/she has the right permissions to update that file.

2. For snap, a developer can just change `CONFIG_FILE` environment variable of snap `redis` service to point to his own above-mentioned configuration file, `developer_redis.conf` (assuming developer is putting his configuration file under the same directory eg. `$SNAP_DATA/redis/conf`; creating a new mounted file system and directory inside snapcraft is beyond the scope of this topic).
2 changes: 1 addition & 1 deletion security.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is intended for inclusion in official EdgeX binary releases,
# such as containers and snaps.
# such as containers.

# To privately report a security vulnerability in EdgeX Foundry
# in the upstream open source repository hosted on github.com.
Expand Down
60 changes: 0 additions & 60 deletions snap/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions snap/hooks/configure

This file was deleted.

21 changes: 0 additions & 21 deletions snap/hooks/connect-plug-edgex-secretstore-token

This file was deleted.

3 changes: 0 additions & 3 deletions snap/hooks/install

This file was deleted.

15 changes: 0 additions & 15 deletions snap/hooks/post-refresh

This file was deleted.

8 changes: 0 additions & 8 deletions snap/hooks/pre-refresh

This file was deleted.

1 change: 0 additions & 1 deletion snap/local/helper-go/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions snap/local/helper-go/Makefile

This file was deleted.

86 changes: 0 additions & 86 deletions snap/local/helper-go/common.go

This file was deleted.

Loading

0 comments on commit b52c6cf

Please sign in to comment.