aboutsummaryrefslogtreecommitdiffstats
path: root/nms
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-21 12:26:19 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-21 12:26:19 +0100
commit0eb9e5b5e2c6f6ac34bc5119f0e4011e0dbf79e6 (patch)
tree922a19e11f38028c737f90bd25ff0867df96859d /nms
parente2c018a18d972679160220b6cf76fa1a337e0a08 (diff)
parent7a1eea87c3cffd208f66e93c04a73e40045f3ef2 (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'nms')
-rw-r--r--nms/.bashrc16
-rw-r--r--nms/README.md26
-rwxr-xr-xnms/config.pm4
3 files changed, 35 insertions, 11 deletions
diff --git a/nms/.bashrc b/nms/.bashrc
new file mode 100644
index 0000000..06072e3
--- /dev/null
+++ b/nms/.bashrc
@@ -0,0 +1,16 @@
+NAME='NMS Docker'
+
+
+ln -s /srv/tgmanage/web/etc/apache2/nms.tg16.gathering.org.conf /etc/apache2/sites-enabled/
+ln -s /srv/tgmanage/nms/config.pm /srv/tgmanage/include/
+echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /srv/tgmanage/web/.htpasswd
+
+/etc/init.d/apache2 restart
+echo "go here to look at nms: http://172.17.0.2:8080/"
+
+# Aliases
+alias h="history"
+alias l="ls -lAhoF --color --show-control-chars"
+alias ll="ls -lash --color --show-control-chars"
+alias cd..="cd .."
+
diff --git a/nms/README.md b/nms/README.md
index 107b630..7be3f14 100644
--- a/nms/README.md
+++ b/nms/README.md
@@ -4,21 +4,29 @@
- fetch data from tg server: `scp ${USER}@wat.gathering.org:/root/nms-2015.sql.gz .`
- Rename the nms dump so we can use it later: `mv nms-2015.sql.gz nms-dump.sql.gz`
-- Do the Debian install(or whatever OS you're on.): https://docs.docker.com/engine/installation/linux/debian/ And make sure that your user is in the docker group, so that you can run docker without sudo.
+- Do the Debian install(or whatever OS you're on.):
+https://docs.docker.com/engine/installation/linux/debian/
+And make sure that your user is in the docker group, so that you can run docker without sudo.
- Clone repository: `git clone git@github.com:tech-server/tgmanage.git`
-
- run `./makedockerfiles.sh`, which creates the docker image files, and builds
them.
-- Start database node: `docker run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --rm -ti --name=db nms-db`
-- Start front end node: ` docker run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --rm -ti --name=front --link=db:db nms-front `
-- Find IP's: `docker inspect front`, `docker inspect db`
-- Start a shell in a container: `docker exec front /bin/bash`
-- Open localhost:PORT in browser to start testing.
+- Start database node:
+`docker run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --rm -ti --name=db nms-db`
+
+- Start front end node:
+-- with cgroup: `docker run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --rm -ti --name=front --link=db:db nms-front`
+
+-- getting to prompt(without cgroup):
+`docker run -v "/home/kiro/repos/tgmanage:/srv/tgmanage" -v "/home/kiro/repos/tgmanage/nms/.bashrc:/root/.bashrc" -w "/srv/tgmanage/web/nms.gathering.org" \
+-rm=true -ti --name=front --privileged nms-front /bin/bash`
+- Find IP's:
+`docker inspect nms-db | grep "IPAddress\":"`
+`docker inspect nms-front | grep "IPAddress\":"`
+- Open the nms-front ip in the web browser.
+http://172.17.0.2:8080/
-## TODO
-- finish the installation guide above.
diff --git a/nms/config.pm b/nms/config.pm
index faaeaa1..db9775f 100755
--- a/nms/config.pm
+++ b/nms/config.pm
@@ -6,9 +6,9 @@ package nms::config;
# DB
our $db_name = "nms";
-our $db_host = "db";
+our $db_host = "nms-dev-db.gathering.org";
our $db_username = "nms";
-our $db_password = "foobar";
+our $db_password = "nms-lol";
# NMS hash used for public NMS obfuscation of interface names
our $nms_hash = "<removed>";