Deploy custom site on Azure VM (LAMP) - laravel

I am trying to learn how to move an application from on-prem to Cloud (Azure). I have an existing application (PHP, Laravel, MySQL) which is hosted on IIS. Following this tutorial, I was able to create a VM and install LAMP stack on the VM. The last part of the article uses a Wordpress app. But I would like to use the existing custom app I have built. It resides in a repository on Azure DevOps (formerly known as VSTS).
How do I deploy my web app on to the new VM ? I still don't fully understand the infrastructure but I would to learn through this POC.

I believe you have already installed the below dependency and your VM is up and running.
Create an Ubuntu VM (the 'L' in the LAMP stack)
Open port 80 for web traffic
Install Apache, MySQL, and PHP
Verify installation and configuration
Install WordPress on the LAMP server
After this you can actually use Azure devops CI feature to deploy your custom website in the azure vm like you are doing it in on-prem.
If you have some script to deploy, you can create a Azure devops CI/CD pipeline and call the script to deploy it. It has a direct feature to deploy it from code repository.
Azure DevOps Projects presents a simplified experience where you can bring your existing code and Git repo or choose a sample application to create a continuous integration (CI) and continuous delivery (CD) pipeline to Azure.
DevOps Projects also:
Automatically creates Azure resources, such as a new Azure virtual machine (VM).
Creates and configures a release pipeline in Azure DevOps that includes a build pipeline for CI.
Sets up a release pipeline for CD.
Hope it helps.

Related

Connecting TFS repository to Azure DevOps

I have TFS repository for my Java maven project. I want to access that project in Azure DevOps by creating new pipeline.
In Azure DevOps we have 5 options, one of them says to Create new Pipeline via TFVC where it asks for Repository URL (Connection URL).I mentioned Connection URL but still project structure is not displayed in Azure DevOps.
I also tried adding a new service connection(Add azure repos/Team Foundation Service connection), but it is not verifying connection.
I gave Connection Name,Connection URL Username and Password.
Error which I receive is - Failed to query service connection API.
In short ,my TFS project is not importing in Azure DevOps. Please suggest what am I doing wrong.
Guess you were talking about Azure DevOps Service. Since Azure DevOps also have a server call Azure DevOps 2019 which actually is the latest version of TFS at present.
There maybe some misunderstanding. It's not able to directly access any TFS on-premise repository from Azure DevOps Service.
You need to migrate data from TFS to Azure DevOps Services by using the data migration tool.
The data migration tool helps you bring your data from Azure DevOps
Server to Azure DevOps in the cloud. Keep the same work item numbers,
Team Foundation Version Control check-in numbers, Git commit IDs, and
much more after you land in Azure DevOps.
But it do have some limitations of this tool. For example it only supports the two latest releases of Azure DevOps Server at a given time. Currently the following versions of Azure DevOps Server are supported for import:
Azure DevOps Server 2019.0.1
Azure DevOps Server 2019 Update 1
If you just need the source code in TFS repository without keeping any history, work items. The simplest solution is creating a new repository in Azure DevOps and download your code to your local repo from TFS. Finally commit/check in your local repo to your Azure DevOps Service.
If you are using TFVC in your TFS server and want to use Git in Azure DevOps Service. Then use git-tfs as a two-way bridge.

Azure VSTS deployment related issue (Deploying a laravel app)

I'm using azure to deploy my web application, Laravel application
laravel uses site\wwwroot\public as entry point
For that reason I'm using "site\wwwroot\public" in Virtual applications and directories under application settings
Where can I find the setting of the location where the code will deploy that will arrive from VSTS (deployment source)
Application settings on Azure
Right now this is the link where whenever my project arrives from VSTS is deployed
I don't want that, I want it to be deployed in "site\wwwroot\" yet keep entry point of application same as above in bullet

Azure: Will I be able to use source control integration?

Currently, my visual studio solution has 3 projects:
MVC project - to be deployed at say www.something.com
Web Api - to be deployed at api.something.com
SPA application - to be deployed at app.something.com
Will I be able to host all of these just through VSO source control? I am not sure if azure would be able to host the applications at respective sub-domains without explicitly defining them?
Can anybody please clarify? And what would be the best approach?
if you host your application on Azure App service, there is continues deployment service. You can have your code next to your site (Local Git https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/) or you can have your code in supported repository e.g github/bitbucket etc ..
And Azure App Service supports virtual directly, you can have multiple apps in the same site. see detail answer from here Publish Multiple Projects to Different Locations on Azure Website

Installing cleardb on a local Cloud Foundry installation

I am new to Cloud Foundry and I want to set up a local CF instance in Vagrant. I followed the steps described in http://docs.cloudfoundry.org/deploying/boshlite/ and got a local instance up and running. I am also able to deploy a simple Ruby app into CF.
Now I want to deploy the Spring sample application from https://docs.cloudfoundry.org/buildpacks/java/gsg-spring.html into CF for which I need a ClearDB database service.
Using the command proposed to create a service instance cf create-service cleardb spark mysql I get the following error:
Creating service instance mysql in org test-org / space test-space as admin...
FAILED
Service offering cleardb not found
When I check my service marketplace in my CF installation with cf marketplace I get
Getting services from marketplace in org test-org / space test-space as admin...
OK
No service offerings found
This brings me to the suggestion that there are "no services installed". So my question is: how can I install a clearDB service in a local CF environment - and is this possible at all, since the Github projects says something like
Prior to deployment, the operator should define three subnets via their infrastructure provider. The MySQL release is designed to be deployed across three subnets to ensure availability in the event of a subnet failure. During installation, a fourth subnet is required for compilation vms.
Any help / resource is highly appreciated. Thanks a lot!
Cloud Foundry as a Pivotal-sponsored open source project predates Cloud Foundry as its own independent open source project, so what you're seeing is actually shared documentation that still has some references specific to Pivotal Web Services: http://docs.run.pivotal.io/buildpacks/java/gsg-spring.html. I'd encourage you to raise the issue against the buildpacks documentation repo (https://github.com/cloudfoundry/docs-buildpacks/issues), you can reference this search result: https://github.com/cloudfoundry/docs-buildpacks/search?utf8=%E2%9C%93&q=cleardb
All it means is you need a MySQL database service. Hosted Cloud Foundry offerings often have ready-to-go MySQL service offerings (such as ClearDB) in their marketplaces; if you're deploying your own Cloud Foundry then you have a couple options.
Provision a MySQL database externally (not as part of your BOSH-Lite), and bind it to your application as a "user-provided service": https://docs.cloudfoundry.org/devguide/services/user-provided.html
Deploy your own MySQL service to BOSH-Lite and register a service broker. Here's a release that's ready to use, with instructions for deploying: https://github.com/cloudfoundry/cf-mysql-release

how do deploy CodeIgniter application from gitHub

I am having some challenges deploying from Amazon Web Services AWS Code Deploy from a github repository.
The repository houses a web application using the codeigniter framework.
When deploying to an EC2 instance using the AWS Code Deploy, it would start the deployment process and then fail. No error message was provided.
Can anyone provide some further guides on how to deploy codeigniter apps to AWS without using FTP.
Thanks,
Rick

Resources