Wordpress on Elasticbeanstalk with RDS and EFS - wordpress

I am trying to deploy an Wordpress application on top of ElasticBeanstalk with EFS and RDS attaching to it.
I am using EFS is for storing Wordpress files.
Configured Elastic beanstalk with auto-scaling. When we are terminating existing instance, auto-scaling should create another application with all properties set like.. RDS and EFS connection details.
But When new application is launched by auto-scaling, it is not retrieving RDS, EFS and other properties that were set initially. New application is prompting for setting again for DB and other setting.
How to make these persistent when additional application is launched in Elastic Beanstalk?

You have to create custom AMI with pre-configured wordpress setup. Then in your ASG you are going to use the AMI. This way, the new instances will launch will RDS, EFS and other properties per-configured.

Related

Deploy Azure Databricks workspace in your own Virtual Network (VNet)

I have already provisioned databricks instance, now I need to add Deploy Azure Databricks workspace in your own Virtual Network (VNet) this setting as YES. As I need to make my databricks instance behind Vnet.
How Can I edit it to the already configured instance. Is there any possible way as Networking section is grid out as I selected no previously with Vnet option.
You can't change networking configuration of already deployed workspace. You need to create new one with correct configuration, and then migrate from your existing workspace.

AWS pipeline and Github

I'm new to AWS CI/CD. We current have one wordpress website running on two AWS EC2 instances, the live site is on the AWS EC2 instance for live, and the staging one is with the development EC2 instance and I put part of my codes on Github, getting rid of files like plugins. The github repository has two branches, one is development and another is Master. I current want to create one pipeline so once I push code to development branch, it will auto update the code of the staging site and once I merge the development with the Master branch, the code on the live site will be updated.
This is not the new instance from AWS elastic beanstalk at the beginning, so can I set up the AWS pipeline on the exsiting EC2 instances? and will that overwrite the other files not tracked by Git? I don't want those plugins files overwriten when I set up the pipeline.
If they're all possible, how should I set up it? Anyone can give me a logic brief?
I current want to create one pipeline
Sadly you can't do this. You need one CodePipeline (CP) for each branch. Thus you need two CPs, one for master branch and second for the dev branch.
This is not the new instance from AWS elastic beanstalk at the beginning, so can I set up the AWS pipeline on the existing EC2 instances?
Yes, you have to use CP's Elastic Beanstalk (EB) deploy action provider. Since you have two EB environments, each CPs will deploy to its respective EB instance (one for master, and second for dev).
and will that overwrite the other files not tracked by Git? I don't want those plugins files overwriten when I set up the pipeline.
Not sure what do you mean, but during deployment everything that is in the application folder on EB (/var/app/current) will be deleted and replaced with new version of your application.

How to setup docker-compose to work with app engine and wordpress?

I am using gitlab ci/cd to deploy my app to google app engine. I already have php instance working properly but when i try build wordpress image using docker-compose, nothing happen.
these are my files:
I have a folder "web" with a files ping.php: https://site-dot-standalone-applications.appspot.com/ping.php
So application is running into /web folder.
wordpress should be deployed into /web folder after:
docker-compose up
UPDATE
Just needed use the following gitlab-ci.yaml:
Unfortunately, you cannot (easily) deploy containers to App Engine Flex this way.
At its simplest, App Engine Flex is a service that combines a load-balancer, an auto-scaler and your docker image. Your image when run as a container is expected to provide an HTTP/S endpoint on port 8080.
There are 2 ways that App Engine could support your deployment but it does neither:
It bundles a WordPress app image and a MySQL image into a single "pod" and exposes WordPress' HTTP port on :8080. This isn't what you want because then each WordPress instance has its own MySQL instance.
It separates the WordPress app into one service and the MySQL app into another service. This is closer to what you want as you could then scale the WordPress instances independently of the MySQL instances. However, databases are the definitive stateful app and you don't want to run these as App Engine services.
The second case suggests some alternative approaches for you to consider:
Deploy your WordPress app to App Engine but use Google Cloud SQL service link.
If you don't want to use Cloud SQL, you could run your MySQL database on Compute Engine link.
You may wish to consider Kubernetes Engine. This would permit both the approaches outlined above and there are tools that help you migrate from docker-compose files to Kubernetes configurations link.
Since you're familiar with App Engine, I recommend you consider using option #1 above (Cloud SQL)

WordPress with Elastic Beanstalk CLI

We have a website hosting with AWS Elastic Beanstalk and are using the eb deploy command to upload changes, etc... The issue I am having is it seems to overwrite any files that were uploaded using the WordPress dashboard when I deploy new changes. I tried adding wp-content/uploads to my .ebignore but then all images on the website are dead. Is there a way to not overwrite this folder at all?
You should never upload files to a server running on Elastic Beanstalk. Those files will be lost at some point, either during a deployment or a scale-in event or something else. The only method of making changes to your EB server should be through the eb deploy command. In addition that method of storing files will not work at all once you scale up your EB environment to multiple servers.
You should be utilizing the AWS S3 service for image storage. There are several Wordpress plugins that facilitate storage of images on S3.

Accessing file share from Azure Website

We have a web application that consists of three main parts:
Web server running ASP.NET 4.5 Web site;
Database server hosting SQL Server 2012;
Another server hosting some Legacy App used by back office;
Relations between parts are as follows:
Web application runs with App Pool Identity set to local user called Foo and consumes database using Entity Framework;
Legacy app consumes database and periodically exports data changes in file system as XML files, folder is shared to local user Foo (local user has the same password as on Web Server) using Windows File Share feature;
Web application monitors file share for new data and imports all the changes if any;
Now we would like to migrate this application to Azure. Unfortunately we have to use VM for SQL Server because our legacy app database uses File Stream feature which is not available on Azure SQL. Also, we need another VM for legacy app.
Currently I have ended up with the following:
Created a new Virtual Network on Azure;
Created a new Azure Website and connected it to VNET using Point-To-Site VPN connection;
Created 2 VM's for SQL Server and legacy app and connected both to VNET, marked network as private network, disabled firewall;
Everything works fine except one thing - Website is unable to access file share located on Legacy App VM. I have tried to enable sharing to Everyone but to no avail.
So, my question: is it possible to access a file share from an Azure website? If not, what alternatives do I have?
I know that we could spin up another VM for Website and then I would have no issues but I would like to use Azure Website to optimize costs and make use of all Azure goodies.
At the time of writing Azure file service SMB shares are only accessible from VMs, Web- and Worker roles. You can use the storage REST.API or client library to access your files from Azure Websites or on-premise. You can get it from nuget.
Install-Package WindowsAzure.Storage
I went through the same exercise of moving a web application that used files to Azure.
Example of what I did.

Resources