[SEBA-616] create skeleton for device-management container Dockerfile and main.go
Change-Id: If8cbdae5820067f93e0f795390c539e0626ff822
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..404b4a2
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=device-management.git
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..3594da6
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+# copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# docker build -t opencord/device-management:latest .
+# docker build -t 10.90.0.101:30500/opencord/kafka-topic-exporter:latest .
+
+FROM golang:1.12-alpine3.9 AS build-env
+RUN mkdir /app
+ADD . /app/
+WORKDIR /app
+RUN CGO_ENABLED=0 GOOS=linux go build -o main .
+
+FROM alpine:3.9.4
+WORKDIR /app/
+COPY --from=build-env /app/main .
+ENTRYPOINT ["./main"]
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6929a5f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,51 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Configure shell
+SHELL = bash -eu -o pipefail
+
+# Variables
+VERSION ?= $(shell cat ./VERSION)
+CONTAINER_NAME ?= $(notdir $(abspath .))
+
+## Docker related
+DOCKER_REGISTRY ?=
+DOCKER_REPOSITORY ?=
+DOCKER_BUILD_ARGS ?=
+DOCKER_TAG ?= ${VERSION}
+DOCKER_IMAGENAME := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${CONTAINER_NAME}:${DOCKER_TAG}
+
+## Docker labels. Only set ref and commit date if committed
+DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
+DOCKER_LABEL_VCS_REF ?= $(shell git diff-index --quiet HEAD -- && git rev-parse HEAD || echo "unknown")
+DOCKER_LABEL_COMMIT_DATE ?= $(shell git diff-index --quiet HEAD -- && git show -s --format=%cd --date=iso-strict HEAD || echo "unknown" )
+DOCKER_LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
+
+all: test
+docker-build:
+ docker build $(DOCKER_BUILD_ARGS) \
+ -t ${DOCKER_IMAGENAME} \
+ --build-arg org_label_schema_version="${VERSION}" \
+ --build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
+ --build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
+ --build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
+ --build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
+ -f Dockerfile .
+docker-push:
+ docker push ${DOCKER_IMAGENAME}
+
+test: docker-build
+
+clean:
+ @echo "No cleanup available"
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9a76e8d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,11 @@
+# device-management Repo.
+
+This Repo contains the code for importer and related functionality. Importer is module which collects the
+device data from the devices which support REDFISH and publishes onto kafka bus. Exporter is another module
+which listens on kafka bus and makes the data available to the dashboard for user.
+
+# Importer
+
+Importer gets the device details from NEM and periodicaly collects data using REDFISH RESTful APIS based on HTTP.
+The interface between NEM andimporter is GRPC. Importer also registers for events from the device like alerts,
+removal/insertion events. It then publishes data on kafka bus to collect the data.
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..0d4d124
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.1.0-dev
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..5974595
--- /dev/null
+++ b/main.go
@@ -0,0 +1,25 @@
+// Copyright 2018 Open Networking Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package main
+
+import (
+ "fmt"
+)
+
+func main() {
+ fmt.Println("Starting Device-management Container")
+ for {
+ }
+}