I'm using AWS Opswork for Puppet Enterprise and a git control-repo to manage the puppet code.
I created some tasks on
control-repo/site/mymodule/tasks
And I can run them from Puppet Enterprise UI (Run / Task menu)
But I can't run plans. I created a plan to run several tasks following official documentation on
control-repo/site/mymodule/plans
plan mymodule::myplan(TargetSpec $nodes) {
run_task('mymodule::myTask', $nodes)
run_task('mymodule::myTask2', $nodes)
}
The plans doesn't appears on Puppet Enterprise UI. Has anyone managed to execute a plan from Puppet Enterprise? Is there any workaround?
Thanks
Related
We're in the middle of working on a small proof of concept project which will deploy infrastructure to Azure using Terraform. Our Terraform source is held in GitHub and we've using Terraform cloud as the backend to store our state, secrets etc.
Within Terraform cloud we've created two workspaces, one for the staging environment and one for the production environment.
So far we've used the guide on the Terraform docs to develop a GitHub action which triggers on a push to the main branch and deploys our infrastructure to the staging environment. This all works great and we can see our state held in Terraform cloud.
The next hurdle is to promote our changes into the production environment.
Unfortunately we've hit a brick wall trying to figure out how to dynamically change the Terraform cloud workspace within the GitHub action so it's operating on production and not staging. I've spent most of the day looking into this with little joy.
For reference the Terraform backend is currently configured as follows:
terraform {
backend "remote" {
organization = "terraform-organisation-name"
workspaces {
name = "staging-workspace-name"
}
}
}
The action itself does an init and then and apply.
Obviously with the workspace name hardcoded this will only work on staging. Ultimately the questions comes down to how to parameterise or dynamically change the Terraform cloud workspace from the command line?
I feel I'm missing something fundamental and any help or suggestions would be greatly appreciated.
I install hardening feature on my Azure VM with DSC. With this script: https://luke.geek.nz/Using-dsc-for-windows-hardening
How do I know it worked.
the answer is: it depends on how you "installed" the dsc script to the VM, but generally you can just do Test-DSCconfiguration -Verbose on the node. It will run through resources in the configuration and tell you which ones are compliant and which arent.
Another option would be to look at the output of how you applied the dsc script. say, if its an arm template it would return "ok" if everything worked, etc
I have created a new Azure DevOps project. Asp.Net core 2.1, Service Fabric deploy.
First deploy went fine. Without any changes subsequent releases are failing
warnings and error
2018-10-10T08:24:17.8368242Z ##[section]Starting: Deploy Service Fabric Application
2018-10-10T08:24:17.8375072Z ==============================================================================
2018-10-10T08:24:17.8375163Z Task : Service Fabric Application Deployment
2018-10-10T08:24:17.8375234Z Description : Deploy a Service Fabric application to a cluster.
2018-10-10T08:24:17.8375288Z Version : 1.7.22
2018-10-10T08:24:17.8375356Z Author : Microsoft Corporation
2018-10-10T08:24:17.8375410Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=820528)
2018-10-10T08:24:17.8375479Z ==============================================================================
2018-10-10T08:24:20.0073284Z Searching for path: D:\a\r1\a\**\drop\projectartifacts\**\PublishProfiles\Cloud.xml
2018-10-10T08:24:20.2879096Z Found path: D:\a\r1\a\Drop\drop\projectartifacts\Application\Voting\PublishProfiles\Cloud.xml
2018-10-10T08:24:20.3657104Z Searching for path: D:\a\r1\a\**\drop\applicationpackage
2018-10-10T08:24:20.4618957Z Found path: D:\a\r1\a\Drop\drop\applicationpackage
2018-10-10T08:24:20.7317155Z Imported cluster client certificate with thumbprint '25826D862588CBFA3D2113D882255156F7233F44'.
2018-10-10T08:25:02.0637557Z ##[warning]Failed to contact Naming Service. Attempting to contact Failover Manager Service...
2018-10-10T08:25:42.0730582Z ##[warning]Failed to contact Failover Manager Service, Attempting to contact FMM...
2018-10-10T08:26:22.0962942Z ##[warning]No such host is known
2018-10-10T08:26:22.2408731Z Service fabric SDK version: 3.2.176.9494.
2018-10-10T08:26:22.4279087Z ##[error]No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
2018-10-10T08:26:22.4687237Z ##[section]Finishing: Deploy Service Fabric Application
All other devops project releases are failing also for same reason.
Any help to debug appreciated
well, this clearly has nothing to do with the release if all the releases are failing. Something happened to your cluster or to your service endpoint
You would need to check if you can connect to the cluster endpoint manually with powershell, for example (connect-servicefabricluster or something along those lines).
misunderstanding of built in release task.
guess cluster was created by DevOps project create and not release task as I thought.
We have created the Web applications and we have a plan to publish the application as Web App in Azure Marketplace. Publishing the Web App to Marketplace can be done using ARM templates(POC) for one-click deployment for our customers.
When we release the newer version of the application, how can we provide the seamless upgrade to our customers through the Azure Marketplace like Google Play Store (Install button for 1st time and Update button for older version use users?
I came through this article explained the deployment in Azure. But, i didn't find any article for Upgrade Azure App
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-deploy
We can use git pull command to get the updates from other git repository. In Azure kudu, the command could be like this,
D:\home\site\wwwroot>git remote add gitsource https://username#passwordyourgitserver.com/xx.git
D:\home\site\wwwroot>git pull gitsource master
When we release the newer version of the application, how can we provide the seamless upgrade to our customers
After released the new version of your application, you could force your client to execute upper command to get the updates. If you use C# as your programming language, you could use following steps to execute powershell command.
Install System.Management.Automation dll using NuGet.
Run powershell scripts using following method.
private static string RunScript(string scripts)
{
// create Powershell runspace
Runspace runspace = RunspaceFactory.CreateRunspace();
// open it
runspace.Open();
// create a pipeline and feed it the script text
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.AddScript(scripts);
pipeline.Commands.Add("Out-String");
//execute the script
Collection<PSObject> results = pipeline.Invoke();
//close the runspace
runspace.Close();
// convert the script result into a single string
StringBuilder stringBuilder = new StringBuilder();
foreach (PSObject obj in results)
{
stringBuilder.AppendLine(obj.ToString());
}
return stringBuilder.ToString();
}
In the ARM template you use to provision the site for the customer, you can enable continuous deployment to that site from a GitHub repo. So anytime that repo is updated, the website (any or all of them) provisioned by your template will be update with the new drop.
See this sample template: https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy
And then for automated deployments set this to "false":
https://github.com/Azure/azure-quickstart-templates/blob/master/201-web-app-github-deploy/azuredeploy.json#L101
Does anyone know if it is possible to specify the Kubernetes version when deploying ACS Kubernetes flavour?
If so how?
Using the supported resource provider in ARM you cannot specify the version. However, if you use http://github.com/Azure/acs-engine you can do so. ACS Engine is the open source code we (I work for MS) use to drive Azure Container Service. Using this code you have much more flexibility than you do through the published resource provider, but it's a harder onramp. For instructions see https://github.com/Azure/acs-engine/blob/master/docs/kubernetes.md
See examples at https://github.com/Azure/acs-engine/tree/master/examples/kubernetes-releases
You should use acs-engine and follow the deploy guide in the repo (https://github.com/Azure/acs-engine/blob/master/docs/kubernetes/deploy.md).
In the deploy guide they use the file examples/kubernetes.json and in that file there's -
"orchestratorProfile": {
"orchestratorType": "Kubernetes"
}
You can also add the field "orchestratorRelease": "1.7" for Kubernetes 1.7.
To view the whole list of releases available you can use the acs-engine executable and run acs-engine orchestrators that prints all of them.
Other examples can be found in https://github.com/Azure/acs-engine/tree/master/examples/kubernetes-releases