You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/06/14 18:04:57 UTC

[GitHub] dewrich closed pull request #2412: TO -- full TrafficOps/db within docker

dewrich closed pull request #2412: TO -- full TrafficOps/db within docker
URL: https://github.com/apache/trafficcontrol/pull/2412
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/infrastructure/cdn-in-a-box/README.md b/infrastructure/cdn-in-a-box/README.md
new file mode 100644
index 000000000..1f38a9eea
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/README.md
@@ -0,0 +1,35 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+
+CDN In a Box (containerized)
+============================
+
+This is intended to simplify the process of creating a "CDN in a box",  easing
+the barrier to entry for newcomers as well as providing a way to spin up a
+minimal CDN for full system testing.
+
+For now,  only `traffic_ops` is implemented.  Other components will follow as well
+as details on specific parts of the implementation.. 
+
+To start it, install `docker-ce` and `docker-compose` and simply:
+
+    cd infrastructure/cdn-in-a-box/traffic_ops
+    docker-compose up --build
+
+
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml
new file mode 100644
index 000000000..cbe5f92eb
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -0,0 +1,92 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+# To use this compose you should first build Traffic Ops and then copy the RPM to :
+#
+# incubator-trafficcontrol/infrastructure/cdn-in-a-box/traffic_ops/traffic_ops.rpm
+#
+#      cd incubator-trafficcontrol/infrastructure/cdn-in-a-box
+#  
+# Adjust the settings in `variables.env` to suit your needs.
+#
+#      docker-compose up -d
+#
+# The Traffic Ops Go API will then be available on https://localhost:8443,
+# the Perl API on https://localhost:60443, and the postgres database on localhost 5432.
+#
+# Note that this setup is intended for testing and not for production use.
+
+---
+version: '2.1'
+
+networks:
+  tcnet:
+    driver: bridge
+    enable_ipv6: true
+    ipam:
+      driver: default
+      config:
+        - subnet: 172.13.239.0/24
+        - subnet: "fc01:9400:1000:8::/64"
+
+services:
+  db:
+    hostname: db
+    domainname: cdn.local
+    image: postgres:9.6.6
+    networks:
+      - tcnet
+    env_file:
+      - variables.env
+    # TODO: change to expose: "5432" to limit to containers
+    ports: 
+      - "5432:5432"
+
+  trafficops-perl:
+    hostname: trafficops-perl
+    domainname: cdn.local
+    image: trafficops-perl
+    networks:
+      - tcnet
+    env_file:
+      - variables.env
+    # TODO: change to expose: "60443" to limit to containers
+    ports: 
+      - "60443:60443"
+    build:
+      context: traffic_ops
+      args:
+        TRAFFIC_OPS_RPM: traffic_ops.rpm
+    depends_on:
+      - db
+
+  trafficops:
+    hostname: trafficops
+    domainname: cdn.local
+    image: trafficops-go
+    networks:
+      - tcnet
+    env_file:
+      - variables.env
+    ports: 
+      - "8443:443"
+    build:
+      context: traffic_ops
+      dockerfile: Dockerfile-go
+    depends_on:
+      - db
+      - trafficops-perl
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/.gitignore b/infrastructure/cdn-in-a-box/traffic_ops/.gitignore
new file mode 100644
index 000000000..aa2697638
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/.gitignore
@@ -0,0 +1 @@
+traffic_ops.rpm
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
new file mode 100644
index 000000000..36b3c063c
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -0,0 +1,72 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+############################################################
+# Dockerfile to build Traffic Ops container images
+# Based on CentOS 7.2
+############################################################
+
+
+FROM centos:7
+
+RUN yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
+RUN yum install -y \
+	cpanminus \
+	epel-release \
+	nmap-ncat \
+	openssl \
+	perl \
+	perl-Crypt-ScryptKDF \
+	perl-Test-CPAN-Meta && \
+	yum clean all
+
+RUN cpanm Carton
+RUN yum install -y perl-DBIx-Connector
+
+# Override TRAFFIC_OPS_RPM arg to use a different one using --build-arg TRAFFIC_OPS_RPM=...  Can be local file or http://...
+ARG TRAFFIC_OPS_RPM=traffic_ops.rpm
+ADD $TRAFFIC_OPS_RPM /
+RUN yum install -y /$(basename $TRAFFIC_OPS_RPM)
+
+# once installed, remove rpm to lower image size
+RUN rm /$(basename $TRAFFIC_OPS_RPM) && \
+    yum clean all
+
+RUN POSTGRES_HOME=/usr/pgsql-9.6 cd /opt/traffic_ops/app && carton && rm -rf $HOME/.cpan*
+
+RUN /opt/traffic_ops/install/bin/install_go.sh && \
+    /opt/traffic_ops/install/bin/install_goose.sh
+
+RUN export PERL5LIB=/opt/traffic_ops/app/local/lib/perl5/:/opt/traffic_ops/install/lib/ \
+	&& export TERM=xterm \
+	&& export USER=root \
+	&& /opt/traffic_ops/install/bin/download_web_deps -i
+
+# \todo add Drive Letters to postinstall input
+# RUN sed -i -- 's/"value": "b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y"/"value": "0"/g' /opt/traffic_ops/install/data/profiles/profile.trafficserver_edge.traffic_ops
+# RUN sed -i -- 's/"value": "b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y"/"value": "0"/g' /opt/traffic_ops/install/data/profiles/profile.trafficserver_mid.traffic_ops
+
+RUN echo "{\"user\": \"riakuser\",\"password\": \"$TRAFFIC_VAULT_PASS\"}" > /opt/traffic_ops/app/conf/production/riak.conf
+
+EXPOSE 443
+WORKDIR /opt/traffic_ops/app
+ENV MOJO_MODE production
+
+ADD adduser.pl /
+ADD config.sh /
+ADD run.sh /
+CMD /run.sh
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
new file mode 100644
index 000000000..b8a1fac7e
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+############################################################
+# Dockerfile to build Traffic Ops container images
+# Based on CentOS 7.2
+############################################################
+
+
+FROM centos:7
+RUN yum -y install nmap-ncat openssl
+
+RUN mkdir -p /opt/traffic_ops/app/bin /opt/traffic_ops/app/conf/production
+COPY --from=trafficops-perl /opt/traffic_ops/app/bin/traffic_ops_golang /opt/traffic_ops/app/bin/traffic_ops_golang 
+COPY --from=trafficops-perl /usr/local/go /usr/local/go
+
+EXPOSE 443
+WORKDIR /opt/traffic_ops/app
+
+ADD config.sh /
+ADD run-go.sh /
+CMD /run-go.sh
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/adduser.pl b/infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
new file mode 100755
index 000000000..91f66c939
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# adduser.pl creates the sql necessary to add a user to the database for traffic_ops login.
+# Usage:   adduser.pl <username> <password> <role>
+#  -- the password is encrypted appropriately to be compatible with Traffic Ops.
+#
+use strict;
+use Crypt::ScryptKDF qw{ scrypt_hash };
+
+if ($#ARGV < 2) {
+    die "Usage: $ARGV[0] <username> <password> <role>\n";
+}
+
+my $username = shift // 'admin';
+my $password = shift or die "Password is required\n";
+my $role = shift // 'admin';
+
+# Skip the insert if the admin 'username' is already there.
+my $hashed_passwd = hash_pass( $password );
+print <<"ADMIN";
+insert into tm_user (username, role, local_passwd, confirm_local_passwd)
+    values  ('$username',
+            (select id from role where name = '$role'),
+            '$hashed_passwd',
+            '$hashed_passwd' )
+    ON CONFLICT (username) DO NOTHING;
+ADMIN
+
+sub hash_pass {
+    my $pass = shift;
+    return scrypt_hash($pass, \64, 16384, 8, 1, 64);
+}
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/config.sh b/infrastructure/cdn-in-a-box/traffic_ops/config.sh
new file mode 100755
index 000000000..14730f331
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/config.sh
@@ -0,0 +1,128 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Script for running the Dockerfile for Traffic Ops.
+# The Dockerfile sets up a Docker image which can be used for any new Traffic Ops container;
+# This script, which should be run when the container is run (it's the ENTRYPOINT), will configure the container.
+#
+# The following environment variables must be set, ordinarily by `docker run -e` arguments:
+# DB_SERVER
+# DB_PORT
+# DB_ROOT_PASS
+# DB_USER
+# DB_USER_PASS
+# DB_NAME
+# ADMIN_USER
+# ADMIN_PASS
+# CERT_COUNTRY
+# CERT_STATE
+# CERT_CITY
+# CERT_COMPANY
+# DOMAIN
+
+# Check that env vars are set
+envvars=( DB_SERVER DB_PORT DB_ROOT_PASS DB_USER DB_USER_PASS ADMIN_USER ADMIN_PASS CERT_COUNTRY CERT_STATE CERT_CITY CERT_COMPANY DOMAIN)
+for v in $envvars
+do
+	if [[ -z $$v ]]; then echo "$v is unset"; exit 1; fi
+done
+
+key=/server.key
+crt=/server.crt
+
+cat <<-EOF >/opt/traffic_ops/app/conf/cdn.conf
+{
+    "hypnotoad" : {
+        "listen" : [
+            "https://trafficops-perl:60443?cert=$crt&key=$key&verify=0x00&ciphers=AES128-GCM-SHA256:HIGH:!RC4:!MD5:!aNULL:!EDH:!ED"
+        ],
+        "user" : "trafops",
+        "group" : "trafops",
+        "heartbeat_timeout" : 20,
+        "pid_file" : "/var/run/traffic_ops.pid",
+        "workers" : 12
+    },
+    "traffic_ops_golang" : {
+	"insecure": true,
+        "port" : "443",
+        "proxy_timeout" : 60,
+        "proxy_keep_alive" : 60,
+        "proxy_tls_timeout" : 60,
+        "proxy_read_header_timeout" : 60,
+        "read_timeout" : 60,
+        "read_header_timeout" : 60,
+        "write_timeout" : 60,
+        "idle_timeout" : 60,
+        "log_location_error": "stdout",
+        "log_location_warning": "stdout",
+        "log_location_info": "stdout",
+        "log_location_debug": "stdout",
+        "log_location_event": "stdout",
+        "max_db_connections": 20,
+        "backend_max_connections": {
+            "mojolicious": 4
+        }
+    },
+    "cors" : {
+        "access_control_allow_origin" : "*"
+    },
+    "to" : {
+        "base_url" : "http://localhost:3000",
+        "email_from" : "no-reply@traffic-ops-domain.com",
+        "no_account_found_msg" : "A Traffic Ops user account is required for access. Please contact your Traffic Ops user administrator."
+    },
+    "portal" : {
+        "base_url" : "http://localhost:8080/!#/",
+        "email_from" : "no-reply@traffic-portal-domain.com",
+        "pass_reset_path" : "user",
+        "user_register_path" : "user"
+    },
+    "secrets" : [
+        "mONKEYDOmONKEYSEE."
+    ],
+    "geniso" : {
+        "iso_root_path" : "/opt/traffic_ops/app/public"
+    },
+    "inactivity_timeout" : 60
+}
+EOF
+
+cat <<-EOF >/opt/traffic_ops/app/conf/production/database.conf
+{
+        "description": "Local PostgreSQL database on port 5432",
+        "dbname": "$DB_NAME",
+        "hostname": "$DB_SERVER",
+        "user": "$DB_USER",
+        "password": "$DB_USER_PASS",
+        "port": "$DB_PORT",
+        "ssl": false,
+        "type": "Pg"
+}
+EOF
+
+cat <<-EOF >/opt/traffic_ops/app/db/dbconf.yml
+version: "1.0"
+name: dbconf.yml
+
+production:
+  driver: postgres
+  open: host=$DB_SERVER port=$DB_PORT user=$DB_USER password=$DB_USER_PASS dbname=$DB_NAME sslmode=disable
+EOF
+
+openssl req -newkey rsa:2048 -nodes -keyout $key -x509 -days 365 -out $crt -subj "/C=$CERT_COUNTRY/ST=$CERT_STATE/L=$CERT_CITY/O=$CERT_COMPANY"
+chown trafops:trafops $key $crt
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/run-go.sh b/infrastructure/cdn-in-a-box/traffic_ops/run-go.sh
new file mode 100755
index 000000000..fe5af6aea
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/run-go.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Script for running the Dockerfile for Traffic Ops.
+# The Dockerfile sets up a Docker image which can be used for any new Traffic Ops container;
+# This script, which should be run when the container is run (it's the ENTRYPOINT), will configure the container.
+#
+# The following environment variables must be set, ordinarily by `docker run -e` arguments:
+# DB_SERVER
+# DB_PORT
+# DB_ROOT_PASS
+# DB_USER
+# DB_USER_PASS
+# DB_NAME
+# ADMIN_USER
+# ADMIN_PASS
+# CERT_COUNTRY
+# CERT_STATE
+# CERT_CITY
+# CERT_COMPANY
+# DOMAIN
+
+# TODO:  Unused -- should be removed?  TRAFFIC_VAULT_PASS
+
+# Check that env vars are set
+
+set -x
+envvars=( DB_SERVER DB_PORT DB_ROOT_PASS DB_USER DB_USER_PASS ADMIN_USER ADMIN_PASS CERT_COUNTRY CERT_STATE CERT_CITY CERT_COMPANY DOMAIN)
+for v in $envvars
+do
+	if [[ -z $$v ]]; then echo "$v is unset"; exit 1; fi
+done
+
+# Write config files
+if [[ -x /config.sh ]]; then
+	/config.sh
+fi
+
+while ! nc trafficops-perl 60443 </dev/null; do # &>/dev/null; do
+        echo "waiting for trafficops-perl:60443"
+        sleep 3
+done
+
+cd /opt/traffic_ops/app
+ls -l bin
+CDNCONF=/opt/traffic_ops/app/conf/cdn.conf
+DBCONF=/opt/traffic_ops/app/conf/production/database.conf
+mkdir -p /var/log/traffic_ops
+./bin/traffic_ops_golang -cfg $CDNCONF -dbcfg $DBCONF
+
+cat /var/log/traffic_ops/*
+tail -f /dev/null
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/run.sh b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
new file mode 100755
index 000000000..f5fd76deb
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
@@ -0,0 +1,74 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Script for running the Dockerfile for Traffic Ops.
+# The Dockerfile sets up a Docker image which can be used for any new Traffic Ops container;
+# This script, which should be run when the container is run (it's the ENTRYPOINT), will configure the container.
+#
+# The following environment variables are used to configure the database and traffic ops.  They must be set
+# in ../variables.env for docker-compose to pick up the values:
+# 
+# DB_SERVER
+# DB_PORT
+# DB_ROOT_PASS
+# DB_USER
+# DB_USER_PASS
+# DB_NAME
+# ADMIN_USER
+# ADMIN_PASS
+# CERT_COUNTRY
+# CERT_STATE
+# CERT_CITY
+# CERT_COMPANY
+# DOMAIN
+
+# TODO:  Unused -- should be removed?  TRAFFIC_VAULT_PASS
+
+# Check that env vars are set
+envvars=( DB_SERVER DB_PORT DB_ROOT_PASS DB_USER DB_USER_PASS ADMIN_USER ADMIN_PASS CERT_COUNTRY CERT_STATE CERT_CITY CERT_COMPANY DOMAIN)
+for v in $envvars
+do
+	if [[ -z $$v ]]; then echo "$v is unset"; exit 1; fi
+done
+
+# Write config files
+set -x
+if [[ -r /config.sh ]]; then
+	. /config.sh
+fi
+
+while ! nc $DB_SERVER $DB_PORT </dev/null; do # &>/dev/null; do
+        echo "waiting for $DB_SERVER $DB_PORT"
+        sleep 3
+done
+
+TO_DIR=/opt/traffic_ops/app
+cat conf/production/database.conf
+
+export PERL5LIB=$TO_DIR/lib:$TO_DIR/local/lib/perl5
+export PATH=/usr/local/go/bin:/opt/traffic_ops/go/bin:$PATH
+export GOPATH=/opt/traffic_ops/go
+
+cd $TO_DIR && \
+	./db/admin.pl --env=production reset && \
+	./db/admin.pl --env=production seed || echo "db setup failed!"
+
+/adduser.pl $TO_ADMIN_USER $TO_ADMIN_PASSWORD admin | psql -U$DB_USER -h$DB_SERVER $DB_NAME || echo "adding traffic_ops admin user failed!"
+
+cd $TO_DIR && $TO_DIR/local/bin/hypnotoad script/cdn
+exec tail -f /var/log/traffic_ops/traffic_ops.log
diff --git a/infrastructure/cdn-in-a-box/variables.env b/infrastructure/cdn-in-a-box/variables.env
new file mode 100644
index 000000000..50ecf51c3
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/variables.env
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+DOMAIN=domain
+CERT_CITY=Denver
+CERT_COMPANY=NotComcast
+CERT_COUNTRY=US
+CERT_STATE=CO
+DB_NAME=traffic_ops
+DB_ROOT_PASS=twelve
+DB_USER_PASS=twelve
+DB_PORT=5432
+DB_SERVER=db
+DB_USER=traffic_ops
+POSTGRES_PASSWORD=twelve
+PGPASSWORD=twelve
+TO_ADMIN_PASSWORD=twelve
+TO_ADMIN_USER=admin
+TO_EMAIL=cdnadmin@example.com
+TO_HOST=trafficops
+TO_PORT=443
+TO_SECRET=blahblah
+TP_EMAIL=none
+TP_HOST=none


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services