Skip to content

Commit

Permalink
feat: Remove deprecated Mongo code.
Browse files Browse the repository at this point in the history
Mongo DB is no longer a feature.

closes #2598

Signed-off-by: Lenny Goodell <[email protected]>
  • Loading branch information
Lenny Goodell committed Dec 16, 2020
1 parent e250948 commit 476ee72
Show file tree
Hide file tree
Showing 34 changed files with 6 additions and 5,008 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ cd bin
./edge-launch.sh
```

**Note** You must have a database (Mongo or Redis) running before the services will operate
**Note** You must have a database (edis) running before the services will operate
correctly. If you don't want to install a database locally, you can host one via Docker. You may
also need to change the `configuration.toml` files for one or more of the services.

Expand All @@ -142,7 +142,7 @@ Follow the "Installation and Execution" steps above for obtaining and building t
make docker run_docker
```

**Note** The default behavior is to use Redis for the database, use the command `make EDGEX_DB=mongo run_docker` to start EdgeX with Mongo.
**Note** The default behavior is to use Redis for the database.

## Community

Expand Down
5 changes: 2 additions & 3 deletions bin/edgex-docker-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.

# Usage: bin/edgex-docker-launch.sh [mongo]
# Usage: bin/edgex-docker-launch.sh
#
# By default download the Redis based Docker Compose file and attempt to start EdgeX. If the mongo
# option is used, download the Mongo based Docker Compose file and attempt to start EdgeX.
# By default download the Redis based Docker Compose file and attempt to start EdgeX.
#
# To override the compose file entirely set the COMPOSE_FILE_PATH environment variable to the full
# pathname of the compose file you want to use.
Expand Down
2 changes: 1 addition & 1 deletion bin/edgex-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
###
# Launches all EdgeX Go binaries (must be previously built).
#
# Expects that Consul and MongoDB are already installed and running.
# Expects that Consul and Redis are already installed and running.
#
###

Expand Down
12 changes: 0 additions & 12 deletions internal/pkg/bootstrap/handlers/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/edgexfoundry/edgex-go/internal/pkg/bootstrap/interfaces"
"github.com/edgexfoundry/edgex-go/internal/pkg/db"
dbInterfaces "github.com/edgexfoundry/edgex-go/internal/pkg/db/interfaces"
"github.com/edgexfoundry/edgex-go/internal/pkg/db/mongo"
"github.com/edgexfoundry/edgex-go/internal/pkg/db/redis"

bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/bootstrap/container"
Expand Down Expand Up @@ -72,17 +71,6 @@ func (d Database) newDBClient(

databaseInfo := d.database.GetDatabaseInfo()["Primary"]
switch databaseInfo.Type {
// Deprecated: Mongo functionality is deprecated as of the Geneva release.
case db.MongoDB:
return mongo.NewClient(
db.Configuration{
Host: databaseInfo.Host,
Port: databaseInfo.Port,
Timeout: databaseInfo.Timeout,
DatabaseName: databaseInfo.Name,
Username: credentials.Username,
Password: credentials.Password,
})
case db.RedisDB:
conf := db.Configuration{
Host: databaseInfo.Host,
Expand Down
4 changes: 0 additions & 4 deletions internal/pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import (
const (
// Databases

// MongoDB the unique identifier used in configuring the system to signal the underlying database used is MongoDB.
//
// Deprecated: Mongo functionality is deprecated as of the Geneva release.
MongoDB = "mongodb"
RedisDB = "redisdb"

// Data
Expand Down
112 changes: 0 additions & 112 deletions internal/pkg/db/mongo/client.go

This file was deleted.

90 changes: 0 additions & 90 deletions internal/pkg/db/mongo/client_test.go

This file was deleted.

Loading

0 comments on commit 476ee72

Please sign in to comment.