Compare commits

..

31 Commits

Author SHA1 Message Date
Sukchan Lee
e4989c7aa3 fix the README.md 2018-02-22 11:27:38 +09:00
Sukchan Lee
5365893c34 Release 0.3.4 2018-02-22 02:17:11 +00:00
Sukchan Lee
3c65414135 Release 0.3.4 2018-02-22 02:14:31 +00:00
Sukchan Lee
80bcfcf646 Release 0.3.4 2018-02-22 02:10:52 +00:00
Sukchan Lee
7e460fbcb4 dput is added 2018-02-22 10:47:21 +09:00
Sukchan Lee
62fe796d41 fix check.sh 2018-02-22 09:51:38 +09:00
Sukchan Lee
0104543f7d add manpage for dev 2018-02-22 00:48:42 +09:00
Sukchan Lee
39c30cb908 fix it 2018-02-22 00:32:11 +09:00
Sukchan Lee
c09b272e53 fix the base image for docker-dev 2018-02-22 00:30:28 +09:00
Sukchan Lee
92d8bde84a change dependency docker-dev 2018-02-22 00:18:31 +09:00
Sukchan Lee
e2bb5706fa update Dockerfile 2018-02-21 23:55:44 +09:00
Sukchan Lee
d74afc5bc7 for old version gcc compiler, we fix the size of child_desc in TLV message library 2018-02-21 14:48:41 +00:00
Sukchan Lee
c8a65b6b18 add other OS for docker 2018-02-21 23:20:48 +09:00
Sukchan Lee
f5582c97b5 NULL-pointer sgw_ue context is accessed (#18) 2018-02-21 17:29:47 +09:00
Sukchan Lee
b8cc130bf5 update check.sh 2018-02-21 14:35:46 +09:00
Sukchan Lee
12d65e92d1 re-arrange package between base and dev 2018-02-21 14:11:41 +09:00
Sukchan Lee
2904284405 Dockerfile cache invalidating for nextepc build 2018-02-21 13:16:11 +09:00
Sukchan Lee
f1b0cd5748 Merge branch 'master' of https://github.com/acetcom/nextepc 2018-02-21 12:35:19 +09:00
Sukchan Lee
91c9586561 update docker configuration 2018-02-21 12:35:05 +09:00
Sukchan Lee
05cfcf4cc3 Override configuration if DB_URI environment variable is existed 2018-02-21 03:25:48 +00:00
Sukchan Lee
c827701824 update it 2018-02-20 23:57:06 +09:00
Sukchan Lee
5fcc7e2ee6 runtime is testedwq 2018-02-20 23:49:24 +09:00
Sukchan Lee
bd1dff2dc5 missing files 2018-02-20 22:47:56 +09:00
Sukchan Lee
f1ad0b11ae change network configuration for docker 2018-02-20 22:29:46 +09:00
Sukchan Lee
9a86d4cb7c Initial Proposal for Docker (#16) 2018-02-20 19:36:34 +09:00
Sukchan Lee
38cccb8a85 move new directory 2018-02-17 15:15:17 +09:00
Sukchan Lee
2d72eaa24d Docker for MongoDB and WebUI recommended by Issue (#16) 2018-02-17 14:47:06 +09:00
Sukchan Lee
f915820f3a network script update for linux 2018-02-15 16:59:27 +09:00
Sukchan Lee
1009ac5e47 add masquerading for Mac OS X 2018-02-14 20:09:04 +09:00
Sukchan Lee
536138457e fix the warning for Mac OS X 2018-02-14 10:22:36 +09:00
Sukchan Lee
730053cef4 update README.md 2018-02-14 10:07:20 +09:00
41 changed files with 659 additions and 4389 deletions

View File

@@ -29,6 +29,7 @@ To get the latest Ubuntu version, please visit the official Ubuntu website: [htt
The NextEPC package is available on the recent versions of Ubuntu. The NextEPC package is available on the recent versions of Ubuntu.
```bash ```bash
sudo apt-get update
sudo apt-get -y install software-properties-common sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:acetcom/nextepc sudo add-apt-repository ppa:acetcom/nextepc
sudo apt-get update sudo apt-get update
@@ -69,7 +70,7 @@ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sL http://nextepc.org/static/webui/install | sudo -E bash - curl -sL http://nextepc.org/static/webui/install | sudo -E bash -
``` ```
The service name is *nextepc-webui*. You must run it manually after installation. And then, the web server will be running on _http://localhost:3000_. The service name is *nextepc-webui*, and it will be running on _http://localhost:3000_.
```bash ```bash
sudo systemctl start nextepc-webui sudo systemctl start nextepc-webui

View File

@@ -8,7 +8,7 @@ dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_INIT([NextEPC], [0.3.3], [acetcom@gmail.com]) AC_INIT([NextEPC], [0.3.4], [acetcom@gmail.com])
AC_SUBST(LIBVERSION) AC_SUBST(LIBVERSION)
LIBVERSION=1:0:0 LIBVERSION=1:0:0
@@ -379,24 +379,15 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS(\ AC_CHECK_FUNCS(\
atexit \ atexit \
gettimeofday \ gettimeofday \
inet_ntop \
inet_pton \
inet_aton \
memmove \ memmove \
sigaction \
sigwait \
sigsuspend \
stpcpy \
strcasecmp \
strtoul \
stricmp \
strerror \ strerror \
inet_ntop inet_pton inet_aton \
sigaction sigwait sigsuspend \
stpcpy strcasecmp strtoul stricmp \
writev \ writev \
utime \ utime utimes sem_timedwait \
utimes \ pthread_yield sched_yield \
sem_timedwait \ getenv putenv setenv unsetenv \
pthread_yield \
sched_yield \
) )
AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(gethostbyname, nsl)

24
debian/changelog vendored
View File

@@ -1,3 +1,27 @@
nextepc (0.3.4-1~xenial) xenial; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 22 Feb 2018 02:16:08 +0000
nextepc (0.3.4-1~artful) artful; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 22 Feb 2018 02:14:43 +0000
nextepc (0.3.4~xenial) xenial; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 22 Feb 2018 02:09:23 +0000
nextepc (0.3.4~artful) artful; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 22 Feb 2018 01:33:04 +0000
nextepc (0.3.3-3~artful) artful; urgency=medium nextepc (0.3.3-3~artful) artful; urgency=medium
* Support Docker * Support Docker

View File

@@ -114,6 +114,26 @@ CORE_DECLARE(void *) core_buffer_to_bcd(c_uint8_t *in, int in_len, void *out);
*/ */
CORE_DECLARE(char *)core_cpystrn(char *dst, const char *src, size_t dst_size); CORE_DECLARE(char *)core_cpystrn(char *dst, const char *src, size_t dst_size);
/**
* Get the value of an environment variable
* @param value the returned value, allocated from @a pool
* @param envvar the name of the environment variable
*/
CORE_DECLARE(char *) core_env_get(const char *envvar);
/**
* Set the value of an environment variable
* @param envvar the name of the environment variable
* @param value the value to set
*/
CORE_DECLARE(status_t) core_env_set(const char *envvar, const char *value);
/**
* Delete a variable from the environment
* @param envvar the name of the environment variable
*/
CORE_DECLARE(status_t) core_env_delete(const char *envvar);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -13,6 +13,8 @@ extern "C" {
#define TLV_MAX_MORE 8 #define TLV_MAX_MORE 8
#define TLV_1_OR_MORE(__v) __v[TLV_MAX_MORE] #define TLV_1_OR_MORE(__v) __v[TLV_MAX_MORE]
#define TLV_MAX_CHILD_DESC 128
typedef enum { typedef enum {
TLV_UINT8, TLV_UINT8,
TLV_UINT16, TLV_UINT16,
@@ -37,7 +39,7 @@ typedef struct _tlv_desc_t {
c_uint16_t length; c_uint16_t length;
c_uint8_t instance; c_uint8_t instance;
c_uint16_t vsize; c_uint16_t vsize;
void *child_descs[]; void *child_descs[TLV_MAX_CHILD_DESC];
} tlv_desc_t; } tlv_desc_t;
extern tlv_desc_t tlv_desc_more1; extern tlv_desc_t tlv_desc_more1;

View File

@@ -143,3 +143,56 @@ char *core_cpystrn(char *dst, const char *src, size_t dst_size)
return (d); return (d);
} }
char *core_env_get(const char *envvar)
{
#ifdef HAVE_GETENV
return getenv(envvar);
#else
return NULL;
#endif
}
status_t core_env_set(const char *envvar, const char *value)
{
#if defined(HAVE_SETENV)
if (0 > setenv(envvar, value, 1))
return CORE_ENOMEM;
return CORE_OK;
#elif defined(HAVE_PUTENV)
char buf[HUGE_STRING_LEN];
if (snprintf(buf, HUGE_STRING_LEN, "%s=%s", envvar, value) < 0)
return CORE_ENOMEM;
if (0 > putenv(buf))
return CORE_ENOMEM;
return CORE_OK;
#else
return CORE_ENOTIMPL;
#endif
}
status_t core_env_delete(const char *envvar)
{
#ifdef HAVE_UNSETENV
unsetenv(envvar);
return CORE_OK;
#else
/* hint: some platforms allow envvars to be unset via
* putenv("varname")... that isn't Single Unix spec,
* but if your platform doesn't have unsetenv() it is
* worth investigating and potentially adding a
* configure check to decide when to use that form of
* putenv() here
*/
return CORE_ENOTIMPL;
#endif
}

View File

@@ -137,6 +137,54 @@ static void misc_test7(abts_case *tc, void *data)
ABTS_TRUE(tc, strcmp("001010123456819", out) == 0); ABTS_TRUE(tc, strcmp("001010123456819", out) == 0);
} }
#define TEST_ENVVAR_NAME "core_test_envvar"
#define TEST_ENVVAR2_NAME "core_test_envvar2"
#define TEST_ENVVAR_VALUE "Just a value that we'll check"
static void misc_test8(abts_case *tc, void *data)
{
char *value;
status_t rv;
rv = core_env_set(TEST_ENVVAR_NAME, TEST_ENVVAR_VALUE);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR_NAME);
ABTS_PTR_NOTNULL(tc, value);
ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value);
rv = core_env_delete(TEST_ENVVAR_NAME);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR_NAME);
ABTS_PTR_NULL(tc, value);
rv = core_env_set(TEST_ENVVAR_NAME, "");
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR_NAME);
ABTS_PTR_NOTNULL(tc, value);
ABTS_STR_EQUAL(tc, "", value);
rv = core_env_delete(TEST_ENVVAR_NAME);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR_NAME);
ABTS_PTR_NULL(tc, value);
rv = core_env_set(TEST_ENVVAR2_NAME, TEST_ENVVAR_VALUE);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR2_NAME);
ABTS_PTR_NOTNULL(tc, value);
ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value);
value = core_env_get(TEST_ENVVAR_NAME);
ABTS_PTR_NULL(tc, value);
value = core_env_get(TEST_ENVVAR2_NAME);
ABTS_PTR_NOTNULL(tc, value);
ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value);
rv = core_env_delete(TEST_ENVVAR2_NAME);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
value = core_env_get(TEST_ENVVAR2_NAME);
ABTS_PTR_NULL(tc, value);
}
abts_suite *testmisc(abts_suite *suite) abts_suite *testmisc(abts_suite *suite)
{ {
suite = ADD_SUITE(suite) suite = ADD_SUITE(suite)
@@ -148,6 +196,7 @@ abts_suite *testmisc(abts_suite *suite)
abts_run_test(suite, misc_test5, NULL); abts_run_test(suite, misc_test5, NULL);
abts_run_test(suite, misc_test6, NULL); abts_run_test(suite, misc_test6, NULL);
abts_run_test(suite, misc_test7, NULL); abts_run_test(suite, misc_test7, NULL);
abts_run_test(suite, misc_test8, NULL);
return suite; return suite;
} }

View File

@@ -3,6 +3,7 @@
#include "core_debug.h" #include "core_debug.h"
#include "core_thread.h" #include "core_thread.h"
#include "core_file.h" #include "core_file.h"
#include "core_lib.h"
#include "context.h" #include "context.h"
@@ -48,6 +49,10 @@ status_t app_will_initialize(const char *config_path, const char *log_path)
if (context_self()->db_uri) if (context_self()->db_uri)
{ {
/* Override configuration if DB_URI environment variable is existed */
if (core_env_get("DB_URI"))
context_self()->db_uri = core_env_get("DB_URI");
rv = context_db_init(context_self()->db_uri); rv = context_db_init(context_self()->db_uri);
if (rv != CORE_OK) return rv; if (rv != CORE_OK) return rv;
d_print(" MongoDB URI : '%s'\n", context_self()->db_uri); d_print(" MongoDB URI : '%s'\n", context_self()->db_uri);

View File

@@ -396,8 +396,9 @@ static int s1ap_usrsctp_recv_handler(struct socket *sock,
case SCTP_PEER_ADDR_CHANGE: case SCTP_PEER_ADDR_CHANGE:
break; break;
case SCTP_SEND_FAILED : case SCTP_SEND_FAILED :
d_error("SCTP_SEND_FAILED" d_error("flags:0x%x - SCTP_SEND_FAILED"
"(type:0x%x, flags:0x%x, error:0x%x)\n", "(type:0x%x, flags:0x%x, error:0x%x)\n",
flags,
not->sn_send_failed_event.ssfe_type, not->sn_send_failed_event.ssfe_type,
not->sn_send_failed_event.ssfe_flags, not->sn_send_failed_event.ssfe_flags,
not->sn_send_failed_event.ssfe_error); not->sn_send_failed_event.ssfe_error);
@@ -416,6 +417,16 @@ static int s1ap_usrsctp_recv_handler(struct socket *sock,
} }
break; break;
} }
case SCTP_REMOTE_ERROR:
{
d_warn("flags:0x%x - SCTP_REMOTE_ERROR"
"(type:0x%x, flags:0x%x, error:0x%x)\n",
flags,
not->sn_remote_error.sre_type,
not->sn_remote_error.sre_flags,
not->sn_remote_error.sre_error);
break;
}
default : default :
d_error("Discarding event with unknown " d_error("Discarding event with unknown "
"flags = 0x%x, type 0x%x", "flags = 0x%x, type 0x%x",

View File

@@ -212,11 +212,10 @@ static int _gtpv1_u_recv_cb(sock_id sock, void *data)
d_assert(bearer->sess->sgw_ue, pkbuf_free(pkbuf); return 0, d_assert(bearer->sess->sgw_ue, pkbuf_free(pkbuf); return 0,
"SGW_UE is NULL"); "SGW_UE is NULL");
d_trace(3, "[SGW] S1U PATH deactivated : STATE[0x%x]\n",
SGW_GET_UE_STATE(sgw_ue));
sgw_ue = bearer->sess->sgw_ue; sgw_ue = bearer->sess->sgw_ue;
d_trace(3, "[SGW] S1U PATH deactivated : STATE[0x%x]\n",
SGW_GET_UE_STATE(sgw_ue));
if ((SGW_GET_UE_STATE(sgw_ue) & SGW_S1U_INACTIVE)) if ((SGW_GET_UE_STATE(sgw_ue) & SGW_S1U_INACTIVE))
{ {
d_trace(5, " SGW-S1U Inactive\n"); d_trace(5, " SGW-S1U Inactive\n");

View File

@@ -1,18 +0,0 @@
#
# NextEPC Dockerfile
#
# https://github.com/acetcom/nextepc
#
# Pull base image.
FROM ubuntu:latest
# Install NextEPC.
RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv F26B05AF && \
echo 'deb http://ppa.launchpad.net/acetcom/nextepc/ubuntu xenial main' > /etc/apt/sources.list.d/nextepc.list && \
apt-get update && \
apt-get install -y nextepc
# Define working directory.
WORKDIR /root

View File

@@ -1,48 +1,64 @@
NextEPC docker Docker running example
=========================================== ===========================================
* Build Image
$ docker-compose build
* docker build -t nextepc . * Development
* docker run --net=host --hostname nextepc -ti --name nextepc --privileged --cap-add=SYS_ADMIN -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup -v $PWD:/mnt nextepc /sbin/init $ docker-compose run dev
* docker exec -it /bin/bash
* sudo apt-get install curl sudo * Runtime
* curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - $ docker-compose \
* curl -sL http://nextepc.org/static/webui/install | sudo -E bash - -f docker-compose.yml -f docker-compose.run.yml run run
* Test
$ docker-compose \
-f docker-compose.yml -f docker-compose.test.yml run test
* Test(ubuntu:artful)
$ TAG=artful docker-compose build
$ TAG=artful docker-compose \
-f docker-compose.yml -f docker-compose.test.yml run test
* Development(fedora:latest)
$ DIST=fedora docker-compose build
$ DIST=fedora docker-compose run dev
* Runtime(debian:jessie)
$ DIST=debian TAG=jessie docker-compose build
$ DIST=debian TAG=jessie docker-compose
-f docker-compose.yml -f docker-compose.run.yml run run
* All Test with All Environment
$ ./check.sh
* Run WebUI
$ docker-compose up -d
For Debian Package Release For Debian Package Release
=========================================== ===========================================
* Ubuntu Docker Setup * Run Docker
$ docker-compose run dev
$ docker run -p 4000:3000 --hostname build -ti --name build --privileged --cap-add=SYS_ADMIN -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup -v $PWD:/mnt ubuntu /sbin/init
$ docker exec -it ubuntu /bin/login
* Access Source Repository
$ sudo apt-get install sudo vim dpkg-dev git
$ git clone https://github.com/acetcom/nextepc
$ git checkout new_branch
* Check Pakcage
$ dpkg-buildpackage
$ sudo apt-get install ....
$ dpkg-buildpackage
* Setup Debian Environment * Setup Debian Environment
export DEBFULLNAME='Sukchan Lee' export DEBFULLNAME='Sukchan Lee'
export DEBEMAIL='acetcom@gmail.com' export DEBEMAIL='acetcom@gmail.com'
* Transfer GPG key * Transfer GPG key
$ gpg --export-secret-keys --armor --output private.asc' $ gpg --export-secret-keys --armor --output private.asc
$ gpg --import private.asc $ gpg --import private.asc
$ gpg --export > public.asc' $ gpg --export > public.asc
$ gpg --import public.asc $ gpg --import public.asc
* Update debian/changelog
$ sudo apt-get install devscripts
$ dch -i
* Test OBS
$ debuild -S
- Upload *.dsc and *.tar.gz to https://build.opensuse.org/package/show/home:acetcom/nextepc
* Upload LaunchPad * Upload LaunchPad
$ dch -i
$ debuild -S
$ dput ppa:acetcom/nextepc *.source.changes $ dput ppa:acetcom/nextepc *.source.changes
* Build pckage
$ dpkg-buildpackage
For Mac OS X (SCTP-patch)
===========================================
* /Applications/Docker.app/Contents/Resources/moby
Update linuxkit-kernel, vmlinuz64

View File

@@ -0,0 +1,24 @@
ARG dist=ubuntu
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
WORKDIR /root
COPY setup.sh /root
ARG USER=acetcom
ARG REPO=nextepc
ARG BRANCH=master
RUN git clone https://github.com/$USER/$REPO
ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /root/nextepc-ver.json
RUN cd nextepc && \
git fetch && git checkout -f -B master origin/master && \
autoreconf -f -i && \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var && \
make -j `nproc` install

10
support/docker/build/setup.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
ip tuntap add name pgwtun mode tun
fi
ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null
ip addr add 45.45.0.1/16 dev pgwtun
ip addr del cafe::1/64 dev pgwtun 2> /dev/null
ip addr add cafe::1/64 dev pgwtun
ip link set pgwtun up

View File

@@ -0,0 +1,24 @@
ARG dist=centos
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN yum -y install \
autoconf \
libtool \
gcc \
flex \
bison \
git \
lksctp-tools-devel \
libidn-devel \
gnutls-devel \
libgcrypt-devel \
openssl-devel \
cyrus-sasl-devel \
libyaml-devel \
iproute
RUN yum -y install epel-release && \
yum -y install mongo-c-driver-devel

View File

@@ -0,0 +1,22 @@
ARG dist=centos
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN yum -y install \
cscope \
vim \
sudo \
iputils \
net-tools
COPY setup.sh /root
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}
WORKDIR /home/${username}

View File

@@ -0,0 +1,10 @@
#!/bin/sh
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
ip tuntap add name pgwtun mode tun
fi
ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null
ip addr add 45.45.0.1/16 dev pgwtun
ip addr del cafe::1/64 dev pgwtun 2> /dev/null
ip addr add cafe::1/64 dev pgwtun
ip link set pgwtun up

View File

@@ -0,0 +1 @@
7

18
support/docker/check.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
docker-compose build
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
TAG=artful docker-compose build
TAG=artful docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=fedora docker-compose build
DIST=fedora docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=centos docker-compose build
DIST=centos docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=debian TAG=jessie docker-compose build
DIST=debian TAG=jessie docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
docker rm $(docker ps -qa --no-trunc --filter "status=exited")

1
support/docker/debian Symbolic link
View File

@@ -0,0 +1 @@
ubuntu/

View File

@@ -0,0 +1,22 @@
version: '3'
services:
run:
network_mode: "host"
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-build
depends_on:
- mongodb
- build
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun:/dev/net/tun"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
volumes:
- config:/etc/nextepc
hostname: nextepc-run
command: /bin/bash -c "/root/setup.sh; /usr/bin/nextepc-epcd"
volumes:
config: {}

View File

@@ -0,0 +1,18 @@
version: '3'
services:
test:
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-build
depends_on:
- mongodb
- build
environment:
DB_URI: mongodb://mongodb/nextepc
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun:/dev/net/tun"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
hostname: nextepc-test
command: /bin/bash -c "/root/setup.sh; /usr/bin/testepc"

View File

@@ -0,0 +1,73 @@
version: '3'
services:
mongodb:
image: mongo
container_name: nextepc-mongodb
ports:
- "27017:27017"
volumes:
- mongodb:/data/db
webui:
build: webui
image: ${USER}/nextepc-webui
container_name: nextepc-webui
depends_on:
- mongodb
ports:
- "3000:3000"
depends_on:
- mongodb
environment:
DB_URI: mongodb://mongodb/nextepc
base:
build:
context: ./${DIST-ubuntu}/${TAG-latest}/base
args:
dist: ${DIST-ubuntu}
tag: ${TAG-latest}
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-base
command: /bin/bash -c "echo 'base' services"
build:
build:
context: ./build
args:
dist: ${DIST-ubuntu}
tag: ${TAG-latest}
username: ${USER}
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-build
depends_on:
- base
command: /bin/bash -c "echo 'build' services"
dev:
build:
context: ./${DIST-ubuntu}/${TAG-latest}/dev
args:
dist: ${DIST-ubuntu}
tag: ${TAG-latest}
username: ${USER}
image: ${USER}/${DIST-ubuntu}-${TAG-latest}-dev
depends_on:
- mongodb
- base
environment:
DB_URI: mongodb://mongodb/nextepc
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun:/dev/net/tun"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
volumes:
- home:/home/${USER}
- ${HOME}:/mnt
hostname: nextepc-dev
command: /bin/bash -c "chmod 666 /dev/net/tun; /root/setup.sh; su acetcom"
volumes:
mongodb: {}
home: {}

View File

@@ -0,0 +1,23 @@
ARG dist=fedora
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN dnf -y install \
autoconf \
libtool \
gcc \
flex \
bison \
git \
lksctp-tools-devel \
libidn-devel \
gnutls-devel \
libgcrypt-devel \
mongo-c-driver-devel \
openssl-devel \
cyrus-sasl-devel \
snappy-devel \
libyaml-devel \
iproute

View File

@@ -0,0 +1,22 @@
ARG dist=fedora
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN dnf -y install \
cscope \
vim \
sudo \
iputils \
net-tools
COPY setup.sh /root
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}
WORKDIR /home/${username}

View File

@@ -0,0 +1,10 @@
#!/bin/sh
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
ip tuntap add name pgwtun mode tun
fi
ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null
ip addr add 45.45.0.1/16 dev pgwtun
ip addr del cafe::1/64 dev pgwtun 2> /dev/null
ip addr add cafe::1/64 dev pgwtun
ip link set pgwtun up

View File

@@ -0,0 +1 @@
27

View File

@@ -0,0 +1,10 @@
ARG tag=latest
FROM ubuntu:${tag}
RUN apt-get update && \
apt-get -y install software-properties-common && \
add-apt-repository ppa:acetcom/nextepc && \
apt-get update && \
apt-get install -y nextepc
WORKDIR /root

View File

@@ -0,0 +1 @@
xenial

View File

@@ -0,0 +1 @@
trusty

View File

@@ -0,0 +1 @@
xenial

View File

@@ -0,0 +1,37 @@
ARG dist=ubuntu
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
autoconf \
automake \
libtool \
gcc \
flex \
bison \
git \
libsctp-dev \
libgnutls28-dev \
libgcrypt-dev \
libssl-dev \
libidn11-dev \
libyaml-dev \
build-essential \
iproute2 \
ca-certificates \
netbase \
curl \
pkg-config && \
apt-get clean
WORKDIR /root
RUN curl -SLO "https://github.com/mongodb/mongo-c-driver/releases/download/1.9.2/mongo-c-driver-1.9.2.tar.gz"; \
tar xzf mongo-c-driver-1.9.2.tar.gz; \
cd mongo-c-driver-1.9.2; \
./configure --disable-automatic-init-and-cleanup; \
make -j `nproc` install; \
ldconfig;

View File

@@ -0,0 +1 @@
../xenial/dev

View File

@@ -0,0 +1,29 @@
ARG dist=ubuntu
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
autoconf \
automake \
libtool \
gcc \
flex \
bison \
git \
libsctp-dev \
libgnutls28-dev \
libgcrypt-dev \
libssl-dev \
libmongoc-dev \
libbson-dev \
libyaml-dev \
build-essential \
iproute2 \
ca-certificates \
netbase \
pkg-config && \
apt-get clean

View File

@@ -0,0 +1,32 @@
ARG dist=ubuntu
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
debhelper \
devscripts \
dput \
dh-autoreconf \
dh-systemd \
manpages-dev \
fakeroot \
cscope \
vim \
sudo \
iputils-ping \
net-tools && \
apt-get clean
COPY setup.sh /root
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}
WORKDIR /home/${username}

View File

@@ -0,0 +1,10 @@
#!/bin/sh
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
ip tuntap add name pgwtun mode tun
fi
ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null
ip addr add 45.45.0.1/16 dev pgwtun
ip addr del cafe::1/64 dev pgwtun 2> /dev/null
ip addr add cafe::1/64 dev pgwtun
ip link set pgwtun up

View File

@@ -0,0 +1,21 @@
FROM node:carbon
MAINTAINER Sukchan Lee <acetcom@gmail.com>
ARG PACKAGE=nextepc
ARG VERSION=0.3.3
RUN set -e; \
cd /usr/src; \
rm -rf ./$PACKAGE; \
curl -SLO "https://github.com/acetcom/$PACKAGE/archive/v$VERSION.tar.gz"; \
tar -xvf v$VERSION.tar.gz; \
mv ./$PACKAGE-$VERSION/ ./$PACKAGE;
WORKDIR /usr/src/nextepc/webui
RUN npm install && \
npm run build
CMD npm run start
EXPOSE 3000

View File

@@ -6,14 +6,25 @@ if [ "$SYSTEM" = "Linux" ]; then
if ! grep "pgwtun" /proc/net/dev > /dev/null; then if ! grep "pgwtun" /proc/net/dev > /dev/null; then
ip tuntap add name pgwtun mode tun ip tuntap add name pgwtun mode tun
fi fi
if test "x`sysctl -n net.ipv6.conf.pgwtun.disable_ipv6`" = x1; then
echo "net.ipv6.conf.pgwtun.disable_ipv6=0" > /etc/sysctl.d/30-nextepc.conf
sysctl -p /etc/sysctl.d/30-nextepc.conf
fi
ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null
ip addr add 45.45.0.1/16 dev pgwtun ip addr add 45.45.0.1/16 dev pgwtun
ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr del cafe::1/64 dev pgwtun 2> /dev/null
ip addr add cafe::1/64 dev pgwtun ip addr add cafe::1/64 dev pgwtun
ip link set pgwtun up ip link set pgwtun up
else else
sysctl -w net.inet.ip.forwarding=1
ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
if [ "$SYSTEM" = "Darwin" ]; then
if ! test -f /etc/pf.anchors/org.nextepc; then
sudo sh -c "echo 'nat on {en0} from 45.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.nextepc"
fi
pfctl -e -f /etc/pf.anchors/org.nextepc
fi
fi fi

View File

@@ -1,6 +1,6 @@
{ {
"name": "nextepc", "name": "nextepc",
"version": "0.3.3", "version": "0.3.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "nextepc", "name": "nextepc",
"version": "0.3.3", "version": "0.3.4",
"description": "NextEPC", "description": "NextEPC",
"main": "index.js", "main": "index.js",
"repository": "https://github.com/acetcom/nextepc", "repository": "https://github.com/acetcom/nextepc",

File diff suppressed because it is too large Load Diff