This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Adding digital ocean cluster connection setup #9388
Draft
muradkhateeb78
wants to merge
20
commits into
dev
Choose a base branch
from
feat/setup-DO-cluster
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ed40fd6
Adding digital ocean cluster connection setup
muradkhateeb78 11f1fae
add code for logging into DOCR and creating repo
muradkhateeb78 5f66ee2
Update AWS ECR references to DOCR
muradkhateeb78 ddf1e62
Add code for builder fixes for DO cluster
muradkhateeb78 abdaf38
Ammend code for DO specific operations
muradkhateeb78 cbdc6f2
Push local changes to remote origion
muradkhateeb78 f814264
Fix location errors and remove redundatnt logs
muradkhateeb78 40dccc3
Overriding cookies dependency
barankyle f993464
Remove unnecessary logs
muradkhateeb78 5f2a57a
Update build scripts
muradkhateeb78 828e99b
Added imagePullSecrets to Jobs/CronJobs
barankyle c20df05
Update BuildX commands
muradkhateeb78 b6df1cd
Restored buildx and added --load flag.
barankyle efba606
remove redundent variable declarations
muradkhateeb78 baec478
Relocate DO specific Vars
muradkhateeb78 3a1c8eb
Update variables for DO
muradkhateeb78 abf4af6
Update conditional statements to accomudate 's3'
muradkhateeb78 23e2526
Merge branch 'dev' into feat/setup-DO-cluster
muradkhateeb78 41b69ee
Merge branch 'dev' into feat/setup-DO-cluster
muradkhateeb78 76d9a49
Merge branch 'dev' into feat/setup-DO-cluster
muradkhateeb78 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
73 changes: 73 additions & 0 deletions
73
packages/server-core/src/media/storageprovider/s3-do.storage.ts
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,73 @@ | ||
/* | ||
CPAL-1.0 License | ||
|
||
The contents of this file are subject to the Common Public Attribution License | ||
Version 1.0. (the "License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE. | ||
The License is based on the Mozilla Public License Version 1.1, but Sections 14 | ||
and 15 have been added to cover use of software over a computer network and | ||
provide for limited attribution for the Original Developer. In addition, | ||
Exhibit A has been modified to be consistent with Exhibit B. | ||
|
||
Software distributed under the License is distributed on an "AS IS" basis, | ||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the | ||
specific language governing rights and limitations under the License. | ||
|
||
The Original Code is Ethereal Engine. | ||
|
||
The Original Developer is the Initial Developer. The Initial Developer of the | ||
Original Code is the Ethereal Engine team. | ||
|
||
All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023 | ||
Ethereal Engine. All Rights Reserved. | ||
*/ | ||
|
||
import { FunctionSummary } from '@aws-sdk/client-cloudfront' | ||
|
||
import config from '../../appconfig' | ||
import S3Provider from './s3.storage' | ||
|
||
/** | ||
* Storage provide class to communicate with AWS S3 API. | ||
*/ | ||
export class S3DOProvider extends S3Provider { | ||
constructor() { | ||
super() | ||
this.bucketAssetURL = `https://${config.aws.cloudfront.domain}` | ||
this.cacheDomain = config.aws.cloudfront.domain | ||
} | ||
/** | ||
* Invalidate items in the S3 storage. | ||
* @param invalidationItems List of keys. | ||
*/ | ||
override async createInvalidation(invalidationItems: string[]) { | ||
return undefined | ||
} | ||
|
||
override async getOriginURLs(): Promise<string[]> { | ||
return [this.cacheDomain] | ||
} | ||
|
||
override async listFunctions(marker: string | null, functions: FunctionSummary[]): Promise<FunctionSummary[]> { | ||
return [] | ||
} | ||
|
||
async createFunction(functionName: string, routes: string[]) { | ||
return undefined | ||
} | ||
|
||
async associateWithFunction(functionARN: string, attempts = 1) { | ||
return undefined | ||
} | ||
|
||
async publishFunction(functionName: string) { | ||
return undefined | ||
} | ||
|
||
async updateFunction(functionName: string, routes: string[]) { | ||
return undefined | ||
} | ||
} | ||
|
||
export default S3DOProvider |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the
's3-do'
specific check in this file should be moved to S3DOStorageProvider. The class variable should be updated based on DO in constructor of it.