Comments (13)
I can create a pull request for this.
from nucleus.
Nice! I have it successfully running in a very similar fashion - ECS + Fargate + Parameter store for env variables but it took a while to get things right. I'll have a write-up in the coming days I can share.
from nucleus.
but a flag on the s3 config in config.js would probably be better
Yeah, the best way to handle this would probably be a credentials
object on the s3
object that would override using the ec2 metadata service.
from nucleus.
@nullrocket That's awesome, to make things go smoothly please remember to sign our CLA --> https://github.com/atlassian/nucleus#contributors
from nucleus.
Fixed in #46
from nucleus.
I don't think this issue is resolved. When not using aws EC2, even after adding an endpoint to s3.config.init
, The following error is thrown:
{ CredentialsError: Missing credentials in config
nucleus_1 | at IncomingMessage.<anonymous> (/opt/service/node_modules/aws-sdk/lib/util.js:864:34)
nucleus_1 | at emitNone (events.js:111:20)
nucleus_1 | at IncomingMessage.emit (events.js:208:7)
nucleus_1 | at endReadableNT (_stream_readable.js:1064:12)
nucleus_1 | at _combinedTickCallback (internal/process/next_tick.js:139:11)
nucleus_1 | at process._tickDomainCallback (internal/process/next_tick.js:219:9)
nucleus_1 | message: 'Missing credentials in config',
nucleus_1 | retryable: false,
nucleus_1 | time: 2020-02-29T22:48:55.220Z,
nucleus_1 | code: 'CredentialsError',
nucleus_1 | originalError:
nucleus_1 | { message: 'Could not load credentials from EC2MetadataCredentials',
nucleus_1 | retryable: false,
nucleus_1 | time: 2020-02-29T22:48:55.220Z,
nucleus_1 | code: 'CredentialsError' } }
from nucleus.
Also having the same issue here, trying to connect to DigitalOcean spaces.
I've tried using the recommended environmental variables and a mounted config file (using AWS_SHARED_CREDENTIALS_FILE
) to no avail. Does anyone have a working non-AWS setup? Otherwise, it may be wise to re-open this issue.
from nucleus.
@damienallen I'm interested in using DigitalOcean spaces too. I didn't want to derail this issue, so I made a new one #84. I'd be happy to help get support for DigitalOcean Spaces implemented. If you've made progress, would you be interested in sharing? We can continue this conversation on #84.
from nucleus.
I deploy on Scaleway using their Object Storage service and can't get this to work, I made sure everything is fine but yeah, it fails on EC2MetadataCredentials
, I even tried to force the region to no avail:
s3: {
init: {
endpoint: process.env.S3_ENDPOINT, // The alternate endpoint to reach the S3 instance at,
s3ForcePathStyle: process.env.S3_PATH_STYLE, // Always use path style URLs
region: process.env.AWS_REGION
},
bucketName: process.env.S3_BUCKET, // The name for your S3 Bucket
cloudfront: null
// cloudfront: { // If you don't have CloudFront set up and just want to use the S3 bucket set this to "null
// distributionId: '', // The CloudFront distribution ID, used for invalidating files
// publicUrl: '', // Fully qualified URL for the root of the CloudFront proxy for the S3 bucket
// }
},
│ Thu, 07 May 2020 00:08:21 GMT nucleus:s3 Deciding to write file (either because overwrite is enabled or the key didn't exist)
│ { Error: connect ENETUNREACH 169.254.169.254:80
│ at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
│ message: 'Missing credentials in config',
│ errno: 'ENETUNREACH',
│ code: 'CredentialsError',
│ syscall: 'connect',
│ address: '169.254.169.254',
│ port: 80,
│ time: 2020-05-07T00:11:30.400Z,
│ originalError:
│ { message: 'Could not load credentials from EC2MetadataCredentials',
│ errno: 'ENETUNREACH',
│ code: 'CredentialsError',
│ syscall: 'connect',
│ address: '169.254.169.254',
│ port: 80,
│ time: 2020-05-07T00:11:30.399Z,
│ originalError:
│ { errno: 'ENETUNREACH',
│ code: 'ENETUNREACH',
│ syscall: 'connect',
│ address: '169.254.169.254',
│ port: 80,
│ message: 'connect ENETUNREACH 169.254.169.254:80' } } }
from nucleus.
This might be related: aws/aws-sdk-js#692
I was able to connect to a local Minio server to test the S3 update interaction by having the following s3 configuration. What basically did it was passing in the S3 configuration directly. The s3ForcePathStyle: true
and signatureVersion: "v4"
was necessary for connecting to Minio but I would consult the documentation of your object storage providers to see if they're necessary.
s3: {
init: {
endpoint: "http://127.0.0.1:9000",
s3ForcePathStyle: true,
signatureVersion: "v4",
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
},
bucketName: 'test-update',
cloudfront: null
},
from nucleus.
I am getting the same error when running the app as a Fargate/ECS container, with the AWS ECS Task Role granted full access to the S3 bucket. In the configuration I have only specified bucket name and have set file strategy to "s3". An example of configuring the app for the full-AWS setup would be appreciated.
from nucleus.
@b-zurg Did you ever write up the details on how you configured nucleus to run on Fargate?
from nucleus.
Got it working, setting:
s3: {
init: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
}
},
I'm running the container inside of the EKS, will be good if we could use the assumed role, but the SDK version is too old and does not have support for it.
Thanks for the input @b-zurg
from nucleus.
Related Issues (20)
- COPY failed: stat /var/lib/docker/tmp/docker-builder904419244/config.js: no such file or directory HOT 1
- [ERROR] node-pre-gyp err!
- downloading released package gives 102 error
- Feature Request: delete old versions (from ui and from server) to free up space
- TypeError: Cannot read property 'secret' of undefined
- [QUESTION] How do I remove an application from my Nucleus server HOT 1
- RELEASES files are empty HOT 1
- Can't release both Mac and Windows zip files HOT 1
- [QUESTION] How do I rollback a release that I accidentally made?
- Running `yarn dev` throws `nucleus Failed to connect to DB` error HOT 1
- Accessing the web dashboard throws `nucleus Error: ENOENT: no such file or directory, open 'SOME-DIR/nucleus-server/public_out/index.html'` error HOT 1
- GPG Signing Error - Invalid left-hand side expression in prefix operation
- Install fails on windows/ubuntu HOT 3
- Access-Control-Allow-Origin , Access by CORS
- GPG key is invalid or missing, you must provide "config.gpgSigningKey" HOT 4
- Nuclei Errors:
- Docs correction for electronforge link in docs/Uploading.md
- [question] [howto] How to post a file to Nucleus?
- error E:\User\Documents\Work\nucleus-server\node_modules\sqlite3: Command failed. HOT 9
- Could electron-builder publish electron app to nucleus server? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nucleus.