How to add users and passwords to a local cloudify deployment - cloudify

I am following the Cloudify user guide - its pretty easy to follow, and have installed a local deployment successfully.
Now I want to add users and passwords to the web management interface, how to do this? By default, the web interface supports anonymous login.

Assuming your aim is to obtain full control over deployments, use the Cloudify shell (or "Cloudify CLI").
As the Cloudify shell currently exposes read-only operations, it does not require login details. Configuring secured access for the REST API, however, can be done using spring security (which will be documented soon).

Related

How often are Azure WebApps automatically patched?

I am using an Azure WebApp with development slots running a netcore aspnet install. How often are these instances patched and how are they patched?
Is there any way for me to see a log of exactly when they are patched?
If you are referring to the app itself in Azure App Service when you deploy a Web App from the gallery you get an install of whatever item you selected. That item will not be automatically updated, if they try to update the container this will most likely break your application especially if you had customized that container in any way.
If you are referring to the OS, Microsoft will update the OS and IIS version from time to time and when they do, if there is any possibility of this affecting your app there will be an e-mail sent to the e-mail account registered under the subscription notifying him/her of the maintenance. Normally you shouldn't experience any downtime.
You may also check the Operating system functionality on Azure App Service and Kudu Console for more details.
Hope this helps.

How to deploy Profile with .net Core app on AWS

NOTE: This question is for a .net core console application, not ASP.NET Core.
I am confused on the proper use of a Profile on AWS. What I understand is that AWS would prefer that a profile name is used instead of a file containing AWS credentials (aws_access_key_id, aws_secret_access_key) values.
With .net core, how will I know how to navigate to the users home directory where the credentials file should be stored? (According to this reference: http://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html#using-a-credentials-file
I am creating a .net Core application to connect to Amazon Kinesis and will be deploying it in a Docker container. I want to be able to deploy and have the application find the credentials on its own using .CreateServiceClient<IAmazonKinesis>(). From what I understand, this approach allows AWSOptions to lookup/find the credentials under the covers by locating the credentials file.
Please help me understand how to approach this.
Is the docker container you will be deploying to hosted in ECS? If so, using the IAM Roles for Tasks feature in ECS will be the simplest solution to your question.
Essentially, you can configure an IAM role that the task/container will run under, and configure it's permissions by assigning an IAM policy to that role. ECS manages the process of providing credentials for that role to the docker container. The SDKs will all pick up the credentials ECS provides by default, unless you explicitly override them by providing credentials while creating a client or change your credential provider chain.
We published a blog post about ECS IAM roles for tasks when we launched the feature:
https://aws.amazon.com/about-aws/whats-new/2016/07/amazon-ec2-container-service-now-supports-iam-roles-for-tasks/

Is it possible to execute Azure PowerShell scripts from an ASP MVC project?

I'm new using ASP.Net MVC, so i'm doing an auto-training in order to develop a web portal for an intranet that can receive request from users to deploy Virtual Machines from Azure, the request is received by an administrator who can run a script from the portal to create the Virtual Machine.
For example, The idea is to store the scripts in a database, so when the administrator do the action to create the "virtual Machine 01" (he have limited option of Virtual Machines configurations to create), the software run the script "01" store on the database.
That is possible? I hope I have explained the idea well.
Also, if that is possible, can I also show the possibles error messages is something wrong happened?.
Instead of using Powershell, why not manage it directly from your .NET code?
Azure provides API's that can be called from .NET.
http://azure.microsoft.com/en-us/documentation/api/
You'd probably want to look at their Compute Management API for handling virtual machines.
http://azure.microsoft.com/en-us/documentation/api/management-compute-sdk-net/

Create Azure Cache Programmatically

I am creating an application that automate the deployment to Azure Web Sites. I was able to create Azure Web Site, database and storage programmatically but I didn't saw any library out there that can create Azure Cache programmtically. Anyone?
Thanks in advance. :)
Whatever operations you perform on Windows Azure Management Portal is backed by Windows Azure Service Management API. I'm pretty sure that there's an API for creating and configuring caching programmatically but it has not been made public yet. I would recommend keeping an eye out on the REST API documentation page. This is where you will find information about how you could create cache programmatically.
Azure Managed Cache is in preview and hence REST API are not available for it. Also it can not be created from Portal. However, you can use Powershell commands to create it. Once created you can then manage it from azure portal itself.
Following command can be used for creating Basic Cache of 128MB.
New-AzureManagedCache -Name YourCacheName -Location "YourLocation"
For the detailed steps refer to - Create Azure Managed Cache from Powershell
So you can create .ps1 file or powersehll commands string which then can be invoked from your code.
Hope this helps.

Deploy web site to azure and traditional IIS

I currently work with a legacy asp.net web application and one of the requirements going forward is that it be deployable to windows azure.
I would like to know how difficult it will be to manage deployment to both Azure and a traditional IIS web server.
Azure seems to require a specific customized version of a web applicaiton project is it possible to deploy the customized web application to a standard IIS instance once it has been converted.
EDIT:
It is a ASP.NET Web Application rather than a Web Site (compiles everything into one dll)
UPDATE:
In the end due to the amount of work involved in converting the application to work in Azure and the cost of Azure compared with other cloud solutions it was decided to go with a traditional Cloud hosted virtual server.
And thank you for the really good answers.
Whether or not you can deploy your application to Azure almost as is depends a lot on how your application works. Azure pretty much requires your application be stateless. If it's a plain vanilla web application that stores data in the session or application cache only and saves data to a database only, then you can deploy it to Azure.
If you have stateful services running like background threads (which is bad anyways), or if you save data to the file system (besides temporary caching), then you may have issues. Really, the issues moving to Azure are really the same as moving to any multi-server load balanced solution. One caveat is permanent storage.
If you need to store data in a place other than the database, then you're best off working with Azure's storage solution which has an API and client library for storing binary data, key/value data (they call it tables, but really, it's not tables), and queues. They also do have a transparent blob-as-file-system option for compatibility. If you want to use these in your app that also is used outside of Azure then you need to write an extra layer between your code and the Azure client library that supports both Azure services and standard local service. Azure SDK does include emulators for Azure services, but they're definitely not meant for production use.
As far as the mechanics of Azure-specific projects, that is actually not that difficult. Yes, you need to create an Azure-specific project in your solution that defines the Web Role and what gets deployed, but it will reference your existing Web Application, not the other way around. You can deploy the Azure Web Role to Azure or you can continue to deploy the existing application to IIS normally and concurrently.
Web Site, Web Application, MVC, really doesn't make much of a difference. Actually doesn't have to be .NET either. Can be PHP or Java or whatever you want to put on your VM. It'll all work the same as far as Azure is concerned.
MS likes to push Azure as a Platform-as-a-Service (Paas) solution where they have a ton of services they offer and you run apps on their standard platform, and contrasts that with Amazon AWS which they call Infrastructure-as-a-Service (Iaas) which is "just" a Virtual Machine. However, MS is really just as much a IaaS solution as AWS, perhaps even more so. The only difference between AWS and Azure is AWS allows you to choose what to install on your VM and with Azure you have to use Windows Server 2008 R2 as the basis for your VM (but you can customize the VM image to install custom software on top of windows). With both Azure and AWS, the hosts offer additional PaaS services you can take advantage of for data storage and message routing. AWS also offers tons of extra services like video streaming.
Also note that with Azure (and AWS I think) you can use the services they offer even in a non-hosted application. If you want to use Azure's data storage from a non-Azure application, you can do that, it's just HTTP REST calls to get/put data. The only differences you pay for data in/out between datacenter and your non-datacenter-hosted application which would be free if the app was also inside the datacenter (just the data in/out is free in-datacenter, you still have storage and transaction fees).
A few things:
Samuel Neff's answer mentioned mounting a file system in a blob (a Cloud Drive). Only one instance may lock this cloud drive for writing, so it does not behave like a network file share. You'll need to plan for this.
You'll need to integrate with the Windows Azure diagnostics subsystem, to gain visibility into your app's run state (e.g. performance counters, trace logs, etc.).
If there are 3rd-party apps that your web app depends on, you'll need to install these. These actually get installed as part of the role instance's boot process, either via your OnStart() event handler or as a startup task. The latter allows for admin-level installs (including registry changes, COM component installations, etc.). You'll need to carefully manage these installations, as they impact the boot time of the instance.
For an asp.net app, you'll need to think about session state. In-proc session state won't work, because each instance will have its own state store in memory. The SQL Azure session state provider doesn't have background cleanup agents, so you'll need to build this into your web or worker role instance (see this blog post by the SQL Azure team for the implementation). The best option is to use the AppFabric Cache, a new service that just went into production. This cache-as-a-service provides an custom session state provider for asp.net as well. Note: As of today, the AppFabric Cache service is only accessible via a .NET interface; there's no REST interface for it (all other storage services - tables, blobs, queues - have a REST interface). .NET, Java, and PHP all have storage client libraries. Ruby has one from the open source community.
You'll have to manage scaling out to more than one instance, when the need arises. This is not a built-in service today, but there are 3rd-party services such as ParaLeap's AzureWatch. There's also Microsoft's System Center Operations Manager, which now has Windows Azure monitoring support. You'll also need to handle scale-back situations, where you reduce the number of server instances.
I have some additional details in an answer for a similar StackOverflow question, here.
I have not tried Windows Azure Migration Scanner personally, but if it works as advertised, this would really come in handy.

Resources