-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge release/miura (4.6.0) branch into master (#62)
- Loading branch information
Showing
25 changed files
with
986 additions
and
143 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
- "release/*" | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
name: Deployment Test | ||
jobs: | ||
deployment_test: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:22.04 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Install git | ||
# Installing git for checkout action | ||
run: | | ||
apt update | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get install -y git | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Disabling shallow clone is recommended for improving relevancy of reporting | ||
fetch-depth: 0 | ||
path: ${{ github.event.repository.name }} | ||
submodules: recursive | ||
- name: Move source code | ||
run: mv $GITHUB_WORKSPACE/${{ github.event.repository.name }} /home/carma-cloud | ||
- name: Install dependencies | ||
run: | | ||
cd /home/carma-cloud/scripts | ||
./install_dependencies.sh | ||
- name: Build | ||
run: | | ||
cd /home/carma-cloud/scripts | ||
./build.sh | ||
- name: Configure network and set privileges | ||
run: | | ||
echo -e '127.0.0.1\tcarmacloud' | tee -a /etc/hosts | ||
groupadd tomcat | ||
useradd -g tomcat -m tomcat | ||
chmod g+r /opt/tomcat/conf/* | ||
chmod -R o-rwx /opt/tomcat/webapps/* | ||
chown -R root:tomcat /opt/tomcat | ||
chown -R tomcat:tomcat /opt/tomcat/logs | ||
chown -R tomcat:tomcat /opt/tomcat/temp | ||
chown -R tomcat:tomcat /opt/tomcat/work | ||
- name: Start Tomcat and verify deployment | ||
run: | | ||
/opt/tomcat/bin/catalina.sh start | ||
sleep 10 | ||
if [[ `grep "startup in" /opt/tomcat/logs/catalina.out | wc -l` -ne "1" ]]; then exit 1; fi | ||
if [[ `wget -O - http://carmacloud:8080 | grep "CARMAcloud Login" | wc -l` -ne "1" ]]; then exit 2; fi | ||
if [[ `wget -O - --post-data="uname=ccadmin&pword=admin_testpw" http://carmacloud:8080/api/auth/login | grep "token" | wc -l` -ne "1" ]]; then exit 3; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Docker build | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
docker: | ||
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main | ||
with: | ||
runner: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Docker Hub build | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
- "release/*" | ||
tags: | ||
- "carma-system-*" | ||
jobs: | ||
dockerhub: | ||
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main | ||
secrets: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
with: | ||
runner: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:22.04 | ||
# update package manager and install prerequisites | ||
COPY scripts/install_dependencies.sh /home/carma-cloud/scripts/install_dependencies.sh | ||
RUN /home/carma-cloud/scripts/install_dependencies.sh | ||
COPY src /home/carma-cloud/src | ||
COPY lib /home/carma-cloud/lib | ||
COPY web /home/carma-cloud/web | ||
COPY osmbin /home/carma-cloud/osmbin | ||
COPY *.sh /home/carma-cloud/ | ||
COPY scripts/build.sh /home/carma-cloud/scripts/build.sh | ||
|
||
# download carma-cloud source | ||
RUN /home/carma-cloud/scripts/build.sh | ||
ENTRYPOINT [ "/opt/tomcat/bin/catalina.sh", "run" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import http.client | ||
import json | ||
import requests | ||
|
||
connection = http.client.HTTPConnection("localhost:8080") | ||
# headers = {'Content-type': 'application/json'} | ||
foo = {'timestep': 100, 'seq': 1} | ||
|
||
connection.request("POST", "/carmacloud/simulation/dumb", json.dumps(foo)) | ||
x = requests.post("http://127.0.0.1:8080/carmacloud/simulation/dumb", json.dumps(foo)) | ||
print(x) | ||
|
||
response = connection.getresponse() | ||
print(response.read().decode()) | ||
|
||
connection.request("GET", '/api/rop/details') | ||
response = connection.getresponse() | ||
print(response.read().decode()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
status = warn | ||
monitorInterval = 300 | ||
|
||
appender.rolling.type = RollingFile | ||
appender.rolling.name = LogToRollingFile | ||
appender.rolling.fileName = /opt/tomcat/logs/carmacloud.log | ||
appender.rolling.filePattern = /opt/tomcat/logs/carmacloud-%d{yyyyMMdd}.log.gz | ||
appender.rolling.layout.type = PatternLayout | ||
appender.rolling.layout.pattern = [%-5level %d{HH:mm:ss.SSS} [%c{1}] - %msg%n | ||
appender.rolling.policies.type = Policies | ||
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy | ||
appender.rolling.policies.time.interval = 1 | ||
appender.rolling.policies.time.modulate = false | ||
appender.rolling.strategy.type = DefaultRolloverStrategy | ||
appender.rolling.strategy.max = 366 | ||
|
||
rootLogger.level = debug | ||
rootLogger.appenderRef.stdout.ref = LogToRollingFile |
Oops, something went wrong.