Skip to content

Commit 238a5e8

Browse files
authored
Remove RisingCloud implementation (#12)
1 parent dcc8898 commit 238a5e8

37 files changed

+300
-10511
lines changed

.dockerignore

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
**/node_modules
2-
**/npm-debug.log
3-
**/.DS_Store
4-
**/default.env
5-
**/.env
6-
**/request.json
7-
**/response.json
1+
node_modules
2+
npm-debug.log
3+
.DS_Store
4+
default.env

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@ node_modules
44
.DS_Store
55
.env
66
.idea
7-
task.yaml
8-
webservice.yaml
9-
risingcloud_project.zip
107
*request.json
118
*response.json

Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
FROM node:alpine
22

3-
# Copy in package files and .npmrc, then run npm
43
WORKDIR /srv
5-
COPY node-risingcloud/webservice/package*.json node-risingcloud/webservice/.npmrc node-risingcloud/webservice/
6-
COPY backblaze-frameio-common ./backblaze-frameio-common
74

8-
WORKDIR /srv/node-risingcloud/webservice
5+
COPY package*.json ./
96
RUN npm install
107

11-
COPY node-risingcloud/webservice .
8+
# copy everything else in
9+
COPY . .
1210

1311
EXPOSE 8888
1412

1513
# command to run our app
16-
CMD ["node", "server.js"]
14+
CMD ["node", "src/server.js"]

README.md

+61-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,65 @@ The Backblaze Custom Action for Frame.io allows you to quickly move data between
44

55
![Frame.io screenshot showing custom action on context menu](images/FrameioCustomAction.png)
66

7-
The root directory of the backblaze-frameio GitHub repository contains two directories corresponding to different deployment options, plus directories containing common code and a test client:
7+
The container should run on any container platform. We leverage the container platform to handle TLS termination. If you want to expose the container directly we **strongly** recommend you implement TLS within the app code directly.
88

9-
- [node-docker](node-docker) - generic Node.js deployment
10-
- [node-risingcloud](node-risingcloud) - [Rising Cloud](https://risingcloud.com/) deployment
11-
- [backblaze-frameio-common](backblaze-frameio-common) - common code to interact with Frame.io, B2
12-
- [test-client](test-client) - test client to emulate Frame.io sending custom action requests
9+
## Create a Bucket in Backblaze B2
10+
11+
- [Sign up](https://www.backblaze.com/b2/sign-up.html?referrer=nopref) for a Backblaze account if you do not already have one.
12+
- Sign in to the web console.
13+
- Click **Buckets** under **B2 Cloud Storage** in the navigation menu on the left, then click **Create a Bucket**.
14+
- Enter a bucket name; leave the rest of the settings with their defaults. Note that bucket names must be globally unique. It may take a couple of tries to find an unused bucket name.
15+
- Click **Create a Bucket**.
16+
17+
## Create an Application Key in Backblaze B2
18+
19+
- Still in the Backblaze web console, click **App Keys** under **Account** in the left nav menu, then click **Add a New Application Key**.
20+
- Supply a key name (key names need not be globally unique).
21+
- Click the dropdown by **Allow access to Bucket(s):** and select the bucket you created in the previous step. Leave the rest of the settings with their defaults.
22+
- Click **Create New Key**.
23+
- **IMPORTANT**: make a note of the key ID and application key before leaving this page. You will not be able to go back and retrieve the application key later!
24+
25+
## Create a Custom Action in Frame.io
26+
27+
Login to the [Frame.io Developer Site](https://developer.frame.io/) and create a custom action (Developer Tools > Custom Actions > Create a Custom Action):
28+
29+
- NAME: Backblaze B2
30+
- DESCRIPTION: Import or export assets and projects to Backblaze B2
31+
- EVENT: import-export
32+
- URL: *Set this to your container's endpoint*
33+
- TEAM: Select your team
34+
- ACCESS: Enable if you wish collaborators to have access to the custom action.
35+
36+
## Create a Token in Frame.io
37+
38+
Still in the Frame.io Developer Site, create a token (Developer Tools > Tokens > Create a Token). Provide a suitable token description, enable the **Create** and **Read** scopes under **Assets**, and click **Submit**.
39+
40+
## Configure the Container Environment
41+
42+
You need to set the following environment variables in the container environment. The easiest way to do this is to create a `.env` file.
43+
44+
- `FRAMEIO_TOKEN` = The Frame.io developer **token** you obtain from https://developer.frame.io/app/tokens
45+
- `FRAMEIO_SECRET` = the Frame.io Custom Action **secret** you obtain from https://developer.frame.io/app/custom-actions
46+
- `BUCKET_ENDPOINT` = Your Backblaze B2 S3-compatible endpoint, in the form `https://s3.REGION.backblazeb2.com`
47+
- `BUCKET_NAME` = Your Backblaze B2 bucket name
48+
- `ACCESS_KEY` = Your Backblaze B2 access key - it is strongly recommended this is unique for this app
49+
- `SECRET_KEY` = Your Backblaze B2 secret key - it is strongly recommended this is unique for this app
50+
- `UPLOAD_PATH` = Path in Backblaze B2 for exports, for example `fio_exports`
51+
- `DOWNLOAD_PATH` = Folder in Frame.io for imports, for example `b2_imports`
52+
53+
## Build and Start the Container
54+
55+
To build the Docker image:
56+
57+
```bash
58+
docker build . -t backblaze-frameio
59+
```
60+
61+
Docker responds with an image id. Start a container in daemon mode, listening on port 8888, with the `.env` file you created and the image ID:
62+
```bash
63+
docker run -d -p 8888:8888 --env-file .env backblaze-frameio
64+
```
65+
66+
## Test the Web Service with the Test Client
67+
68+
Follow the instructions in the [test-client](test-client/) directory.

0 commit comments

Comments
 (0)