Skip to content

Commit

Permalink
Anchor Steam 2.0.3 (#1052)
Browse files Browse the repository at this point in the history
* Update devapp1.yml

* Update playwright-dev.yml

* Make audio in scenes (#1053)

* Adjust email notification display time (#1062)

* Fixed the display of dropmenu at the bottom of the users table (#1063)

* Make filter of stage on foyer page (#1064)

* Display total file size of stage media (#1065)

* email corrections, text corrections

* yarn.lock changes

* remove empty strings emebedded by front end

* make the email address table completely clear after sending mail (#1067)

* Issue 1068 Foyer stage list took so long to load (#1069)

* resolve yarn packages

* update python requirements

* strict package version

* optimize foyer stage load

* redo code formating for easier diff

* prettier studio and dashboard for easier diffing pull requests

* fix the blocking blank dashboard (#1070)

* Issue 1068 performance issue (#1071)

* fix the blocking blank dashboard

* migrate things to studio

* refactor imports base url

* upgrade antd version

* stage table in studio

* change backstage entrance

* new stage button in studio

* requirements.freeze

* version

* Issue 1075 Cannot set attr on saving stage (#1076)

* cannot set hybrid attribute

* check instance on exist key only

* Refactoring project structure (#1077)

* refactoring project structure

* updates docs & pre-commit hook

* reduce docs resources size

* move all .env

* fix git guardian security checks

* migrate event archive & email token service

---------

Co-authored-by: tunguyentk <117065175+tunguyentk@users.noreply.github.com>
Co-authored-by: Upstage system user <upstage@app1.upstage.org.nz-1621696771938-s-2vcpu-4gb-nyc1-01>
Co-authored-by: gloriajw <aagg@comcast.net>
Co-authored-by: Hồng Phát <hongphat.js@gmail.com>
Co-authored-by: Willadsen, Gloria (CNTR) <Gloria.Willadsen@Intelsat.com>
  • Loading branch information
6 people committed Mar 5, 2023
1 parent fc477e4 commit e9b28a1
Show file tree
Hide file tree
Showing 769 changed files with 17,197 additions and 13,337 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/devapp1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: DEVAPP1 CI
on:
# Triggers the workflow on push or approved pull request on R1-2021 branch
push:
branches: [ BlueMoon-2.0.2 ]
branches: [ AnchorSteam-2.0.3 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -30,13 +30,13 @@ jobs:
key: ${{ secrets.DEVAPP1_KEY }}
port: ${{ secrets.DEVAPP1_PORT }}
script: |
cd /home/upstage/upstage/ui/dashboard/
cd /home/upstage/upstage/dashboard/
git fetch
git checkout BlueMoon-2.0.2
git checkout AnchorSteam-2.0.3
git pull
yarn
yarn build:dev
cd /home/upstage/upstage/ui/studio/
cd /home/upstage/upstage/studio/
yarn
yarn build:dev
systemctl restart upstage.service
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/playwright-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Playwright Tests
on:
push:
branches: [ Stiegl-22 ]
branches: [ AnchorSteam-2.0.3 ]
pull_request:
branches: [ Stiegl-22 ]
branches: [ AnchorSteam-2.0.3 ]
jobs:
test:
timeout-minutes: 60
Expand All @@ -14,17 +14,17 @@ jobs:
with:
node-version: '14.x'
- name: Install dependencies
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: yarn
- name: Install Playwright Browsers
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: yarn playwright test
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: ui/dashboard/playwright-report/
path: dashboard/playwright-report/
retention-days: 30
8 changes: 4 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
with:
node-version: '14.x'
- name: Install dependencies
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: yarn
- name: Install Playwright Browsers
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./ui/dashboard
working-directory: ./dashboard
run: yarn playwright test
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: ui/dashboard/playwright-report/
path: dashboard/playwright-report/
retention-days: 30
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
__pycache__/
*.pyc
.vscode/
.fleet/
.env/
.venv/
.virtualenv/
*.log
.idea/
uploads/
ui/static/assets/*

.DS_Store
node_modules
Expand Down
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For more information, visit https://mobilise-demobilise.eu and https://upstage.o
## Infrastructure

A complete instance of UpStage should consist of:

- **Upstage Service**: backend code written in Python, Flask, Graphene, SQLAlchemy. This service provides the necessary API Endpoint, mainly in GraphQL to manage stages/media/players and configurations such as foyer, permissions and notifications.
- **Dashboard**: frontend code written in Vue 3, Anime.js, Moveable, Bulma and many canvas operations. This is where most of the user interactions took place, such as the foyer, live stage, backstage and the admin section.
- **MQTT Broker**: this is the magic behind UpStage's performance work. The broker has many topics to be subscribed, such as `meta/demo/chat` can be used to deliveries chat messages between players and audiences in Demo Stage at the `meta` instance. The same broker can also be used for multiple instance of UpStage.
Expand All @@ -32,17 +33,19 @@ A complete instance of UpStage should consist of:
`PostgresSQL`, `MongoDB`, `Nginx` and `MQTT Broker` can be installed using the system package manager, we don't cover them in this section. For a mqtt broker, we recommend using [Mosquitto](https://github.com/eclipse/mosquitto).

1. Clone the repository

```bash
git clone https://github.com/upstage-org/upstage.git
```

2. Setup `UpStage Service`:

```bash
# Install dependencies
pip install -r requirements.pip

# Create the systemd service using our example configuration
cp system/prod/upstage.service /etc/systemd/system/upstage.service
cp config/prod/upstage.service /etc/systemd/system/upstage.service

# Start the service
systemctl start upstage.service
Expand All @@ -52,8 +55,9 @@ systemctl enable upstage.service
```

3. Setup `Dashboard`:

```bash
cd ui/dashboard
cd dashboard

# Install dependencies
yarn
Expand All @@ -65,21 +69,24 @@ yarn build
The compiled source code will be stored in the `dist` folder. Later we will set up `Nginx` to serve these content on our root path.

4. Setup `Studio` (very similar to Dashboard):

```bash
cd ui/studio
cd studio

# Install dependencies
yarn

# Build source
yarn build
```

Studio will be served at `/studio` path of our instance.

5. Setup `Event Archive Service`:

```bash
# Create the systemd service using our example configuration
cp system/prod/event_archive.service /etc/systemd/system/event_archive.service
cp config/prod/event_archive.service /etc/systemd/system/event_archive.service

# Start the service
systemctl start event_archive.service
Expand All @@ -89,12 +96,13 @@ systemctl enable event_archive.service
```

6. Setup `Streaming Service`:

```bash
# Clone the Node-Media-Server repository
git clone https://github.com/illuspas/Node-Media-Server.git

# Create the systemd service using our example configuration
cp system/dev/streaming.service /etc/systemd/system/upstage-streaming.service
cp config/dev/streaming.service /etc/systemd/system/upstage-streaming.service

# Start the service
systemctl start upstage-streaming.service
Expand All @@ -104,18 +112,20 @@ systemctl enable upstage-streaming.service
```

7. Setup `Upstage Send Email Token To Cient Server`:

```bash

# Only setup on Upstage Prod
# Create the systemd service using our example configuration
cp system/prod/upstage_email_token.service /etc/systemd/system/upstage_email_token.service
cp config/prod/upstage_email_token.service /etc/systemd/system/upstage_email_token.service

# Start the service
systemctl start upstage_email_token.service

# Enable the service if you want it start automatically on boot
systemctl enable upstage_email_token.service
```

## Configurations

UpStage was designed to have multiple instances of it working independently. Each instance could have its own configurations set to get worked.
Expand All @@ -141,7 +151,7 @@ DB_PORT=5432
```

```python
# MongoDB connection. Event Archive won't be able to put messages in queue without this configuration setup properly, which can lead to inconsistent stage behavior
# MongoDB connection. Event Archive won't be able to put messages in queue without this configuration setup properly, which can lead to inconsistent stage behavior
MONGO_HOST = ""
MONGO_PORT = 27018
MONGO_DB = "upstage"
Expand All @@ -165,14 +175,14 @@ SECRET_KEY='' # Paste the result from running __init__.py
```

```python
# When setup Send Email Service, only the Upstage server has permission to send the email. The Client-server has to call the external API of the Upstage server.
# When setup Send Email Service, only the Upstage server has permission to send the email. The Client-server has to call the external API of the Upstage server.
# Upstage server will generate and send a token to each client server every 10 minutes. That token has expired in 10 minutes. Client-server stores that token in MongoDB and uses that token to call the sendEmailExternal API of the Upstage server
EMAIL_USE_TLS = True
EMAIL_HOST = 'mail.gandi.net'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 465
ADMIN_EMAIL = '' # A list admin email always in bcc
SUPPORT_EMAILS = '' # A list admin email always in bcc
EMAIL_HOST_DISPLAY_NAME = 'UpStage Support'
ACCEPT_SERVER_SEND_EMAIL_EXTERNAL = ['http://127.0.0.1:8000/'] # This is setup only in app1 server, All client server endpoint having permission using Upstage Send Email service
```
Expand Down Expand Up @@ -235,7 +245,7 @@ Serve `Dashboard` on root path of our instance

```nginx
        location / {
            alias /home/upstage/upstage/ui/dashboard/dist/;
            alias /home/upstage/upstage/dashboard/dist/;
            try_files $uri $uri/ /index.html;
        }
```
Expand All @@ -244,7 +254,7 @@ Serve `Studio` on `/studio` path of our instance. If you change the path, rememb

```nginx
        location /studio {
            alias /home/upstage/upstage/ui/studio/dist/;
            alias /home/upstage/upstage/studio/dist/;
            try_files $uri $uri/ /V4.0/studio/index.html;
        }
```
Expand All @@ -253,7 +263,7 @@ Serve user uploaded media in `/static` path. Caching is important in this config

```nginx
       location /static {
            alias /home/upstage/upstage/ui/static;
            alias /home/upstage/upstage/uploads;
            expires off;
            add_header Cache-Control 'no-cache, must-revalidate';
        }
Expand Down Expand Up @@ -315,11 +325,13 @@ Type=simple
ExecStart=
ExecStart=/usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
```

Finally restart the service

```bash
sudo systemctl restart mosquitto.service
```

## License

[GPL-3.0 License](https://github.com/upstage-org/upstage/blob/main/LICENSE)
26 changes: 0 additions & 26 deletions asset/unittests/crud_tests.py

This file was deleted.

30 changes: 0 additions & 30 deletions auth/__init__.py

This file was deleted.

Loading

0 comments on commit e9b28a1

Please sign in to comment.