I am using the serverless framework for a lambda project. We need to be able to access the cloudformation directly to meet with our standards for other projects. How can I view the full CloudFormation that is compiled from serverless.yml?
Running the package command will generate 2 compiled Cloudformation templates in your service directory, one for stack creation and another for the stack update:
sls package
They'll be available in the folder .serverless as cloudformation-template-create-stack.json and cloudformation-template-update-stack.json, respectively.
I found a plugin that will output a SAM Template from serverless which solved this problem. Here is the link: https://github.com/sapessi/serverless-sam
Related
I Have a Jar file. that takes arguments and perform certain actions.
EX:
java -jar MyJavaEx.jar dev
this jar file will execute some logic inside it and then prints some log.
I want run this job daily using ADF trigger. how to do this?
if this is not possible what's the best alternative approach.
If you're looking for a lightweight, serverless way to run your Java app, I'd consider Azure Functions.
You might find this document helpful:
Azure Functions Java developer guide
lately I was experimenting with Skaffold with our Helm Charts and I am in little bit in a dilemma that our Helm Chart \ Sub Charts are compatible with Skaffold or not.
Our helm Charts are looking like the following
my-helm-charts
+-charts
+-project1
+-project2
+-project3
+-project4
+-infrastructure_kafka
+-charts
+-kafka
+-zookeeper
+-infrastructure_cassandra
+-infrastructure_elasticsearch
+-Charts.yaml
+-Values.yaml
The reason we choosed to structure the Helm Charts this way, is that if necessary to spin up extra stages for our project.
Now when I want to develop project2 with Google Cloud Code / Skaffold (which I configured correctly and I can start without problem in IntelliJ) I have to start whole my-helm-charts.
That is actually Ok but the problem is, if I use Debug in Kubernetes, I have a feeling Google Cloud Code/Skaffold can really locate the project2 and no debugging occurs.
My feeling is Google Cloud/Skaffold is more oriented to work with following contruct...
project2-helm
+-templates
+-Charts.yaml
+-Values.yaml
My Subcharts contructs starts in Google Cloud Code/Skaffold without any exception but I can't debug, is it possible to achieve want I want with my structure and if yes, how?
Or is it not possible at all...
Thx for answers...
We recently added a feature called config dependencies which might help here. It allows you to create more specific skaffold.yamls and then map them together with a "requires" field:
https://skaffold.dev/docs/design/config/#configuration-dependencies
Once you have the skaffold.yamls created and the right dependency mapping you can run skaffold with the -m flag to choose once slice of your services:
skaffold dev -m project3
Cloud Code support for modules is incoming.
Cloud Code IntelliJ and Cloud Code VS Code recently added preview level support for deploying and debugging modules of a larger application which uses Skaffold. See more here https://cloud.google.com/code/docs/intellij/skaffold-modules
I'm trying to deploy my first HTTP trigger Function App to Azure.
It was created with the Azure Function extension in VS Code with TypeScript template.
I use my GitRepo as a source and the Kudu build App Service.
My functions are working well locally. I can see them in VS Code > Azure tab, Local Project > Functions.
I have no error on the deployment itself but I cannot see my two functions in the Azure Functions list.
In the kudu UI, I see that all my files are correctly deployed :
Kudu screenshoot
My settings are :
settings
Where can I find some logs on what went wrong? Any idea of other things to check?
Any help will be appreciated.
I could use Zip deploy (https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push) as an alternative way to deploy this (I haven't tried it yet). I would like to know what's wrong with my current setup.
Not sure if the problem is that you configure the wrong runtime.
Here is the steps I did:
Create a Function app project with an http-trigger function based on TypeScript in VS Code:
Upload the project to GitHub.
Using deployment center to configure deploy from Git on portal.
After deploy, check in Functions page:
By the way, you could deploy from VS Code directly:
I would like to validate my CloudFormation templates before running them. I know about the aws cloudformation validate-template ... cli command, but that ignores incorrect property names. I don't know what the point of that cli command is if it won't catch these kind of mistakes.
I want something that will catch those kind of mistakes before running the templates. An IDE or external service that does this would be fine.
We had a quite similar issue with erroneous Cloud-Formation templates and created (I’m a co-author) a command-line tool, that validates them - besides the standard AWS validation it also has many custom checks, that were essential for us:
https://github.com/Appliscale/perun
I believe it doesn't support property names validation yet, but any feature requests (or pull request even better), are welcome. We will do our best to address them as soon as we can.
After installing Perun, to validate the template you can use the command validate:
~ $ perun validate <PATH TO THE TEMPLATE>
Moreover, it also allows managing (creation, updates etc.) CF stacks and monitoring the status updates.
The cfn-lint tool was built for this exact purpose. It is actively maintained by the AWS team and it has a couple of IDE integrations.
Same issue with me. There is no way to validate the property name. But you can reduce the mistake using Atom IDE with plugins cloudformation, it helps me to create a resources property so I can reduce my typo mistakes.
I'm using the official virtocommerce azure deploy script under folder "virtocommerce\src\Extensions\Setup\VirtoCommerce.PowerShell" to deploy virtocommerce(with azure tool v2.4), i encounted some problems while running "deploy.ps1" script in windows azure powershell
In "azure-db.ps1", there's lot of syntax like "Get-Date –f" , the dash character is wrong ,"–" must be "-", otherwise you will get error.
In "azure-deploy.ps1", there's a function "build-search" which use cspack.exe to create "ElasticSearch.cspkg",that's correct, but for other packages such as "CommerceSite.cspkg" and "AzureScheduler.cspkg", i did not found any functions to create those packages, this will lead to an error says "CommerceSite.cspkg" can not be found.
Does anybody has the same problems?
Turn out that there's some problem inside code:
"deploy.ps1" script is using deploy-tfs.ps1 , and use parameter "$build".
parameter "$build" has been reset to 'False' in "deploy-tfs.ps1"
"azure-deploy.ps1" using "$build" to decide if it's need to build the azure package, and this parameter is always 'False', so the azure package will never be creat.
The script is designed to run on azure sdk 2.4, not 2.5. The script is used to deploy daily both demo and testing environments and were completed succesfully today. You can see the status here: https://virtocommerce.codeplex.com.
As for cspkg, it is generated during actual build, by msbuild. The elastic search ccspkg has to be created differently, as it has to include javaruntime in addition to elasticsearch runtime and packaged into a single setup.
The new, 1.13 version of Virto Commerce by default deploys azure website instead of azure cloud service for website and scheduler (deployed as a web job). Only elastic search is deployed as a cloud service. The setting can be changed in deploy.ps1.
Also make sure to check the complete instructions on how to deploy source code to azure at http://docs.virtocommerce.com/display/vc1devguide/Source+Code+Azure+Deployment.