Deploying Through Seed


#1

Link to chapter - https://serverless-stack.com/chapters/deploying-through-seed.html


#2

I get the warnings below when deploying to dev. Am I supposed to get these?

Seems like it can’t fine the env.yml file, which is no surprise since it’s in .gitignore.

But I guess SEED should create that file with the env vars that we specify - or am i missing something?

2018/05/24 22:57:52 Fetching deployment info

$ serverless info --verbose --stage dev
 
 Serverless Warning --------------------------------------
 
  A valid file to satisfy the declaration 'file(env.yml):dev,file(env.yml):default' could not be found.
 
 
 Serverless Warning --------------------------------------
 
  A valid file to satisfy the declaration 'file(env.yml):dev,file(env.yml):default' could not be found.
 
 
 Serverless Warning --------------------------------------
 
  A valid service attribute to satisfy the declaration 'self:custom.environment.stripeSecretKey' could not be found.

#3

These should be fine since the env.yml is not a part of the repo and won’t be available in the build process.

I’ll add a note to the chapter to avoid any confusion.


#4

I’m getting build failed errors (“Failed to generate build artifacts”) and I don’t understand what the error is because of all my tests pass and the build log looks fine apart from the warnings mentioned in the above post. Looked at the artifacts log and I’m seeing this error at the end:

Serverless: Invoke webpack:package
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: source-map-support@^0.4.18, babel-runtime@^6.26.0, stripe@^6.2.1, uuid@^3.3.2
Serverless: Packaging service…
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage

2018/07/13 10:46:54 Error: exec: internal error

====================
:wastebasket: Cleanup

2018/07/13 10:46:54 Post artifact build cleanup


#5

It seems just for the production artifacts. I think we might be in touch over email as well.


#6

When I tried manual deploy, as I didn’t want every git push to trigger an auto deploy, the deployment is successful, since I am able to use dev v2 as far as running the lambda functions and seeing logs, etc. But the SEED page doesn’t reflect that.

I suspect there’s some sort of state mismatch between the SEED backend and the web GUI?

At the moment I’m unable to promote v2 to prod via the SEED page.

Any idea? Thanks!


#7

Is the build that is in progress still deploying? If you check the build logs?

The deploy process is made up of a few concurrent process (building artifacts). So it is quite possible that the Lambdas have been deployed while it’s waiting for the other artifacts to be generated.


#8

I think the build process in Seed have changed since this chapter was written?
I don’t see the build stage for PROD when I deploy to dev, but I get the opportunity to promote to PROD afterwards.

I don’t know if I have done something different? :slight_smile:


#9

Hmm there have been some changes. Not critical ones but the chapter needs to be updated.

Have you been able to get through this chapter?


#10

Yes I managed to get through :slight_smile:


#12

Seed will not trigger a build for me at all, by pushing to master or by manually using the web interface, even using the serverless.yml from your git.


#13

I’m not seeing the stack outputs when deploying to seed - I can see them when deploying manually with sls deploy -v. Is there some config that I may have changed by mistake to prevent the verbose deployment?


#14

I think by default Seed, uses the verbose flag. Can you post a screenshot of the output you are seeing on Seed?


#15

Has this issue been resolved for you?


#17

I was looking at the Build Log instead of the Serverless Info output :expressionless:. Problem solved.


#18

I’ve spent the last couple hours trying to get a deployment with the limited policy definitions as described here:

There have been a number of issues. One by one, I seem to be resolving them (though I am writing this while yet another Promote build is going on, so don’t know if I’ll get through it.) Do you think that guide is now out of date?


#19

Below is a sample from the Compile step. Locally, I ran ‘npm audit fix’ to clean up vulnerabilities. It appears the Seed build process does not. Is this something that perhaps should be added?

====================
:hammer_and_wrench: Compile

$ npm install
npm WARN goalcats-api@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

added 973 packages from 591 contributors and audited 23448 packages in 18.304s
found 12 vulnerabilities (8 low, 4 high)
run npm audit fix to fix them, or npm audit for details