Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-ciab/run-ciab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ store_ciab_logs() {

cd infrastructure/cdn-in-a-box;
logged_services='trafficrouter readiness';
other_services='dns edge enroller mid-01 mid-02 origin static trafficmonitor trafficops trafficstats trafficvault';
other_services='dns edge enroller mid-01 mid-02 origin static trafficmonitor trafficops trafficstats';
docker_compose='docker-compose -f ./docker-compose.yml -f ./docker-compose.readiness.yml';
$docker_compose up -d $logged_services $other_services;
$docker_compose logs -f $logged_services &
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tp.integration.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
- .github/actions/tp-integration-tests/**
- .github/workflows/tp.integration.tests.yml
- GO_VERSION
- infrastructure/cdn-in-a-box/traffic_vault/**
- infrastructure/cdn-in-a-box/optional/traffic_vault/**
- traffic_ops/*client/**.go
- traffic_ops/testing/api/**.go
- traffic_ops/traffic_ops_golang/**.go
Expand All @@ -42,7 +42,7 @@ on:
- .github/actions/tp-integration-tests/**
- .github/workflows/tp.integration.tests.yml
- GO_VERSION
- infrastructure/cdn-in-a-box/traffic_vault/**
- infrastructure/cdn-in-a-box/optional/traffic_vault/**
- traffic_ops/*client/**.go
- traffic_ops/testing/api/**.go
- traffic_ops/traffic_ops_golang/**.go
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/traffic-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
- go.mod
- go.sum
- GO_VERSION
- infrastructure/cdn-in-a-box/traffic_vault/**
- infrastructure/cdn-in-a-box/optional/traffic_vault/**
- traffic_ops/*client/**.go
- traffic_ops/testing/api/**.go
- traffic_ops/traffic_ops_golang/**.go
Expand All @@ -47,7 +47,7 @@ on:
- go.mod
- go.sum
- GO_VERSION
- infrastructure/cdn-in-a-box/traffic_vault/**
- infrastructure/cdn-in-a-box/optional/traffic_vault/**
- traffic_ops/*client/**.go
- traffic_ops/testing/api/**.go
- traffic_ops/traffic_ops_golang/**.go
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Changed
- Updated `t3c` to request less unnecessary deliveryservice-server assignment and invalidation jobs data via new query params supported by Traffic Ops
- [#6179](https://github.com/apache/trafficcontrol/issues/6179) Updated the Traffic Ops rpm to include the `ToDnssecRefresh` binary and make the `trafops_dnssec_refresh` cron job use it
- [#5927](https://github.com/apache/trafficcontrol/issues/5927) Updated CDN-in-a-Box to not run a Riak container by default but instead only run it if the optional flag is provided.

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/cdn-in-a-box/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
/cache/ATS_VERSION
/optional/vpn/vpnca
/traffic_ops/ca
/traffic_vault/prestart.d/00-0-standalone-config.sh
/optional/traffic_vault/prestart.d/00-0-standalone-config.sh
7 changes: 0 additions & 7 deletions infrastructure/cdn-in-a-box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@ show you the default UI for interacting with the CDN - Traffic Portal.
> <td align="left">Web interfaces on ports 3080 (HTTP) and 3443 (HTTPS), with a DNS service on 53 and an API on 3333</td>
> <td align="left">N/A</td>
> <td align="left">N/A</td>
> </tr>
> <tr class="odd">
> <td align="left">Traffic Vault</td>
> <td align="left">Riak key-value store on port 8010</td>
> <td align="left"><code>TV_ADMIN_USER</code> in variables.env</td>
> <td align="left"><code>TV_ADMIN_PASSWORD</code> in variables.env</td>
> </tr>
> </tbody>
> </table>
>
Expand Down
5 changes: 0 additions & 5 deletions infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ services:
influxdb:
ports:
- "8086:8086"
trafficvault:
ports:
- "8087:8087"
- "8088:8088"
- "8098:8098"
edge:
ports:
- "9000:80"
Expand Down
19 changes: 0 additions & 19 deletions infrastructure/cdn-in-a-box/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,6 @@ services:
volumes:
- shared:/shared

# trafficvault runs a riak container to store private keys
trafficvault:
build:
context: .
dockerfile: traffic_vault/Dockerfile
depends_on:
- enroller
environment:
- CLUSTER_NAME=trafficvault
labels:
- "com.basho.riak.cluster.name=trafficvault"
volumes:
- schemas:/etc/riak/schemas
- shared:/shared
domainname: infra.ciab.test
env_file:
- variables.env
hostname: trafficvault

# edge cache
edge:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.
#
# Expose the trafficvault container on the host on ports 8087, 8088, and 8098

---
version: '2.1'

services:
trafficvault:
ports:
- "8087:8087"
- "8088:8088"
- "8098:8098"
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.
#
#
# This compose file will runs a riak container to store private keys.
#
# Below is an example of how to run the main compose with this file:
#
# docker-compose -f docker-compose.yml -f optional/docker-compose.traffic-vault.yml up
#

---
version: '2.1'

services:
trafficvault:
build:
context: ""
dockerfile: optional/traffic_vault/Dockerfile
environment:
- CLUSTER_NAME=trafficvault
labels:
- "com.basho.riak.cluster.name=trafficvault"
volumes:
- schemas:/etc/riak/schemas
- shared:/shared
domainname: infra.ciab.test
env_file:
- variables.env
hostname: trafficvault

volumes:
schemas:
external: false
shared:
external: false
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y net-tools ca-certificates dnsutils gettext-base \
&& rm -rf /var/lib/apt/lists/* && rm -rf /etc/apt/apt.conf.d/docker-gzip-indexes

ADD traffic_vault/prestart.d/* /etc/riak/prestart.d/
ADD traffic_vault/poststart.d/* /etc/riak/poststart.d/
ADD optional/traffic_vault/prestart.d/* /etc/riak/prestart.d/
ADD optional/traffic_vault/poststart.d/* /etc/riak/poststart.d/
ADD enroller/server_template.json \
traffic_vault/run.sh \
traffic_vault/sslkeys.xml \
optional/traffic_vault/run.sh \
optional/traffic_vault/sslkeys.xml \
traffic_ops/to-access.sh \
/

Expand Down
5 changes: 5 additions & 0 deletions infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ CREDS
fi
}

tv-ping() {
to-auth && \
curl $CURLAUTH $CURLOPTS --cookie "$COOKIEJAR" -X GET "$TO_URL/api/$TO_API_VERSION/vault/ping"
}

to-ping() {
# ping endpoint does not require authentication
curl $CURLAUTH $CURLOPTS -X GET "$TO_URL/api/$TO_API_VERSION/ping"
Expand Down
8 changes: 8 additions & 0 deletions infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ load_data_from() {
touch "$ENROLLER_DIR/initial-load-done"
sync
fi
if [[ "$d" = 'deliveryservices' ]]; then
# Traffic Vault must be accepting connections before enroller can start
until tv-ping; do
echo "Waiting for Traffic Vault to accept connections"
sleep 5
done
fi

[[ -d $d ]] || continue
for f in $(find "$d" -name "*.json" -type f); do
echo "Loading $f"
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/cdn-in-a-box/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
TV_AES_KEY_LOCATION=/opt/traffic_ops/app/conf/aes.key
# Unset TV_BACKEND to use riak as the traffic_vault backend
# Unset TV_BACKEND to use riak as the traffic_vault backend and run the traffic_vault image from the optional directory
TV_BACKEND=postgres
TLD_DOMAIN=ciab.test
INFRA_SUBDOMAIN=infra
Expand Down Expand Up @@ -131,6 +131,6 @@ TV_HTTP_PORT=8098
TV_HTTPS_PORT=8088
ENROLLER_DIR=/shared/enroller
AUTO_SNAPQUEUE_ENABLED=true
AUTO_SNAPQUEUE_SERVERS=trafficops,trafficmonitor,trafficrouter,trafficvault,edge,mid-01,mid-02
AUTO_SNAPQUEUE_SERVERS=trafficops,trafficmonitor,trafficrouter,edge,mid-01,mid-02
AUTO_SNAPQUEUE_POLL_INTERVAL=2
AUTO_SNAPQUEUE_ACTION_WAIT=2