Cannot deploy to Stage or Prod

Cannot deploy to Stage or Prod

11 posts / 0 new
Last post
ldphan99's picture
ldphan99
Points: 0
Cannot deploy to Stage or Prod

Hi everyone,

I feel stupid when asking this but just wonder if anyone is having the same problem.

Problem: my DEV site works, but STAGE and PROD show default devcloud page (I used default urls provided by devcloud).

What I've done: I dragged-n-dropped DEV code to STAGE and PROD (also tried 'Change to'), DEV database to STAGE & PROD, DEV files to STAGE and I rsync PROD files separately (PROD files are huge so I cannot have the same files in all 3 environments)

Am I missing something?

Thanks,
Dang.

Status: 
Unresolved
steve.cronen-townsend@acquia.com's picture
steve.cronen-townsend
Points: 49

Dang,

No need to feel stupid. Web sites are complicated things and so is our Dev Cloud hosting environment. And debugging complex systems is hard. Of course there is nearly unlimited potential, too, which is why we put up with the painstaking work that is often required to get thing working initially.

  1. Check your "Tasks page" at "Dev Cloud >> Tasks" and make sure you see an entry (a row) for each copy/transfer you did on your "Workflows page" and that the Status of each one is "done".
  2. On your "Workflow page" start with all three environments deploying the same version of your code. For SVN the "Change to:" dropdowns should all be set to "trunk". For Git they should all be set to "master".
  3. Checkout a local copy of your code repository with these instructions: http://network.acquia.com/documentation/cloud/import/code-checkout (if you haven't already). And check for any large data files in this tree. On a Linux or Mac system you can use the command line "du -sk | sort -g". If you have checked large data file directories into your code repository it will break our code deployments to your Dev Cloud server. You will need to move them into your files directory, and put symbolic links in your code directories to point to them.

Please post your status back to this thread!

Thanks,


Steve Cronen-Townsend, steve.cronen-townsend@acquia.com
Dev Cloud Support Specialist, Acquia Client Advisory Team
ldphan99's picture
ldphan99
Points: 0

Hi Steve,

I've followed the steps. And it seems that I don't have any files in my code repository. Please see below!

ddiary@drip:~/httpdocs$ git clone tdd@svn-3.devcloud.hosting.acquia.com:tdd.git
Initialized empty Git repository in /home/ddiary/httpdocs/tdd/.git/
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (20/20), 10.72 KiB, done.
Resolving deltas: 100% (3/3), done.
ddiary@drip:~/httpdocs$ ll
total 12
drwxr-xr-x 3 ddiary ddiary 4096 2011-10-12 08:29 .
drwxr-xr-x 6 ddiary ddiary 4096 2011-10-12 08:27 ..
drwxr-xr-x 6 ddiary ddiary 4096 2011-10-12 08:30 tdd
ddiary@drip:~/httpdocs$ cd tdd/
ddiary@drip:~/httpdocs/tdd$ ll
total 28
drwxr-xr-x 6 ddiary ddiary 4096 2011-10-12 08:30 .
drwxr-xr-x 3 ddiary ddiary 4096 2011-10-12 08:29 ..
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 acquia-utils
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 docroot
drwxr-xr-x 8 ddiary ddiary 4096 2011-10-12 08:30 .git
-rw-r--r-- 1 ddiary ddiary 113 2011-10-12 08:30 .gitignore
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 library
ddiary@drip:~/httpdocs/tdd$ du -sk | sort -g
224 .
ddiary@drip:~/httpdocs/tdd$

Any idea?

Thanks,
Dang

ldphan99's picture
ldphan99
Points: 0

ps. I can login to dev and view the dev site. I have uploaded code to dev SVN then switched to GIT then things broke.

steve.cronen-townsend@acquia.com's picture
steve.cronen-townsend
Points: 49

Dang,

Thanks for posting your transcript. The code files for your web site are in the docroot subdirectory. So please do

cd docroot
du -sk * | sort -n

after the commands you showed. (I left out the "*" before to tell du to look at each file/directory in the current directory.)

Depending on your operating system, the command

open .

may work to open the current directory in a graphical interface, and you may look for any big data directories in the repository in that window, if that is easier for you.

Please also make sure that your regular files directory is not in your repository by issuing these commands:

cd sites/default
ls -al

You my find it faster to start off by overwriting this attempt at importing your site with one of the Drupal distributions we offer through your site's "Install page". And you can follow this new and improved document: http://network.acquia.com/documentation/cloud/install. Your choice. You may learn enough to make working with your actual site easier after that.

Let us all know your progress by posting here. Your experiences will help many others. Also know that I am pushing to get our new "Getting Started" guide published today if possible. It has gone through one technical review and is about ready. We really are trying to make the whole process of moving sites to Acquia Dev Cloud easier.

Thanks,


Steve Cronen-Townsend | Dev Cloud Support, Acquia Client Advisory Team
ldphan99's picture
ldphan99
Points: 0

Hi Steve,

the docroot dir is empty. Is that because switching from SVN to GIT broke the code repository?

areeba@drip:/home/ddiary/httpdocs/tdd$ ll
total 28
drwxr-xr-x 6 ddiary ddiary 4096 2011-10-12 08:30 .
drwxr-xr-x 3 ddiary ddiary 4096 2011-10-12 08:29 ..
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 acquia-utils
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 docroot
drwxr-xr-x 8 ddiary ddiary 4096 2011-10-12 08:30 .git
-rw-r--r-- 1 ddiary ddiary 113 2011-10-12 08:30 .gitignore
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 library
areeba@drip:/home/ddiary/httpdocs/tdd$ cd docroot/
areeba@drip:/home/ddiary/httpdocs/tdd/docroot$ ll
total 16
drwxr-xr-x 2 ddiary ddiary 4096 2011-10-12 08:30 .
drwxr-xr-x 6 ddiary ddiary 4096 2011-10-12 08:30 ..
-rw-r--r-- 1 ddiary ddiary 3315 2011-10-12 08:30 acquialogo.gif
-rw-r--r-- 1 ddiary ddiary 1094 2011-10-12 08:30 index.html
areeba@drip:/home/ddiary/httpdocs/tdd/docroot$ du -sk * | sort -n
4 acquialogo.gif
4 index.html

The OS is ubuntu.
Thanks,
Dang.

steve.cronen-townsend@acquia.com's picture
steve.cronen-townsend
Points: 49

Dang,

Since you check out your code from Acquia and the docroot/ is empty, all you need to do is put your code there and do a git commit and a git push to get your code back to Acquia.

It sounds like a change of source control method from SVN to Git when there is already code in the repository is "handled" by starting fresh Git repository and overwriting your old repository. I will investigate this and try to get some feedback for users that switch source control method that says that their existing repository will be erased --- if that is indeed the case.

But you know what to do from this point, at least.

Sorry for the inconvenience and thanks for the help in improving our systems.

Regards,


Steve Cronen-Townsend | Dev Cloud Support, Acquia Client Advisory Team
ldphan99's picture
ldphan99
Points: 0

HI Steve,

Now I have push my code (not files) in the Git repo. I have checked by cloning my repo to another directory and can see the docroot is still empty (only 2 files acquialogo.gif & index.html). I have tried to change the drop-down 'Change to' to different tags and deploy and pull repo again and again and the docroot is still empty. After every deploy, I've tried to access my dev site: http://tdddev.devcloud.acquia-sites.com/ and it shows '404 Not Found' 'The requested URL / was not found on this server'.

Why everything is so difficult? I have the server for 2 weeks and nothing works. I can setup a brand new VPS box within a few hours, but it takes me forever to work with Acquia Dev Cloud. It is a disappointment.

Please help!

Regards,
Dang.

steve.cronen-townsend@acquia.com's picture
steve.cronen-townsend
Points: 49

Think of learning to use these tools to manage sites efficiently in the Acquia Cloud as a little like learning to walk. It is very difficult to learn to walk the first time. Why not just crawl, since it works better at the moment?

The answer is that in the long run, walking is much more efficient and leads to all sorts of other possibilities in terms of reaching high things, getting around quickly, etc... In the case of Acquia Cloud you going to start with the ability to use source control and keep your code changes organized and at any time be able to revert to any previous version of your code. Granted, difficult to learn, but the capability is necessary to develop sites efficiently and sanely with teams of people or even just you. Also, you will get the ability to benefit from serious in-depth performance monitoring of your site with New Relic, which can be invaluable as you start developing higher-traffic sites and need to know what is causing performance lags so you work on the right things instead of wasting your time. Over the long there is no other way to stay growing in web development without using an array of very sophisticated (and complex) tools like this.

Please do not think of things you learn as a waste of time. It is all leading to something *HUGE* and important but hard to see until you get your site being served by Acquia Cloud the first time and start building from there. First steps are important even if you fall frequently at first (and occasionally despair).

Now, on to your most recent "fall" in learning to walk. I have some general advice about source control and where you are -- once you have checked out your code from Acquia you need to put your code in the docroot/ directory AND check the code back into to Acquia. Think of Acquia's source control as like a cash register. At first the cash register is empty. You must open the drawer, put in your cash (code) and push the drawer back in. In your case, you want git push origin master and make sure you are deploying "master" at your site's "Workflow page". If you ever wonder what is in the cash register, you need to pop open the cash drawer and see what is there. In the same way you need to look at your synchronized local version of the code repository and see what is there. If you have any doubt, do another full "git clone" and if there is nothing the the docroot subdirectory of that local copy of your repository at Acquia, then your commands to commit and push your code to Acquia did not work.

Since getting your code to Acquia is only part of the challenge (you also have to put a Require statement at the end of your settings.php file and commit/push that change into your repository at Acquia, get your database to Acquia, and get your files directory to Acquia. I would recommend that you start fresh with a new site, by creating the new site at "Dev Cloud >> Cloud" and go to its install page and install one of the distributions we provide. The instructions are http://network.acquia.com/documentation/cloud/install and are being continuously honed and tested by many people. Following them should allow you to get a test site up fast with all three parts connected and play with source control, for example, with a familiar codebase in the docroot/ you check out from the beginning of the process. Then I recommend going back to your other DC site that is going to be a migration of a real site, and you will have the insight you gained from being successful and practicing on the test site in Dev Cloud. Later, when it get's in your way, you can delete the test site.

Regards,


Steve Cronen-Townsend | Dev Cloud Support, Acquia Client Advisory Team
avinash@asahitechnologies.com's picture
avinash
Points: 0

I am facing the same issue as well.

I installed Acquia Desktop. Added existing code to Git and clicked on Host on Acquia, chose Dev environment. All files are there in Docroot for dev, staging and Prod.

But, the site seems to load only on Dev, not on staging and prod. I see only the welcome page on staging and prod.

Please help.

Thank you.

Avinash

mark@genglobal.org's picture
mark
Points: 0

I am getting HTTP ERROR 500 in aquia dev site. Stg and prod working fine.
Please tell me the solution why it is happening.