Drupal: remote development with Eclipse - drupal

What's the best solution to develop Drupal remotely on a development server, using Eclipse ?
I found this: http://www.eclipse.org/dsdp/tm/
Is this the best way to do it ? And above all, am I going to have some limitations ?
thanks

Sometimes SSH / SFTP is a better solution than Samba. SSH is likely to be activated on most servers an can be mounted into the local file system.

If you only have access via FTP you have two options.
You can set up a connection to the server using remove system explorer. When you set up a new project use the generic new project option and there you should have an option to choose which file system to use.
This will mean that you work directly on the server, be warned this can be slow sometimes, using FTP is slower than most other methods of connecting to a remote system.
The other option is to work locally and deploy to your server when you whish to test something. You can use the 'export' feature for this.

Just use samba on the machine. Point your project at it.

Related

How to manage multiple symfony projects in a development computer

I've seen some post, including How to manage multiple backend stacks for development?, but nothing related to use lxc for a stable, safe and separate development environment, matching the production environment and regardless the desktop and/or linux distribution.
There was a feature previous to symfony cli release that allowed to specify a socket via ip:port, and this allowed to use different names in /etc/hosts using the 127.0.0.0/8 loopback network, so I could always use "bin/console server:start -p:myproject:8000", and I knew that using http://myproject:8000 (specified in /etc/hosts) I could access my project and keep the sessions, etc.
The symfony cli, as far as I've tried, doesn't allow this. Reading the docs, there's a built-in proxy in symfony cli, but though I've set a couple of projects to use this in the container, clicking on the list doesn't open the project (with .wip suffix), and issues an error about proxy redirections. If I browse to the port and ip of the container ip, it works perfectly, but the port is something that can change with every reboot of the container.
If there's nothing that can be set on the proxy side to solve this scenario, I'd ask to take back the socket feature that existed previously, so I can manage this situation as I used to do before, and solve this.
Thanks in advance.
I think I've finally found a good solution. I've created an issue to improve the situation that seemed not to work, so I'll try to explain for whoever might be interested.
I've setup the proxy server built-in with the symfony cli, but instead of allowing it to run with the defaults, I've had to specify --host=proxyhost (resolvable from the host) and setting proxy exceptions for .com, .org, .net, .tv, etc, together with setting a name to attach for every project (issuing symfony proxy:domain:attach myproject from inside the project dir), I can go to http://myproject.wip just like http://proxyhost:portX, no matter which port is portX.

How to edit source code in local computer and server simultaneously

I am a new web developer. I am using XAMPP and Dreamweaver CS6. I want to edit and debug my source code on my local computer. Then I want to commit that edit to my web server (shared or vps). Right now I edit files on local computer and then I upload that file to server.
Can anyone suggest any other options.
Thank you in advance.
I suppose you could achieve this in many ways.
For example you can use deployment tools (like Jenkins) and then configure it to hook your commits. In order to do this you need first to install Git in your system (I'm not sure but maybe you can even find some Git plugins for Dreamweaver so that you could work with Git directly from Dreamweaver; if not don't worry there are plenty of Git clients that help to facilitate use of Git, SourceTree is one of them)
If you feel like you have difficulty in configuring Jenkins to hook your commits I'd suggest you to have a look at this answer.
I haven't used Dreamweaver in forever but you can upload on saving which you set in the Site Definition. Go to the Remote definition that you setup and click on the Advanced tab. You can set DW to automatically upload on save there. It's generally not best practice but it's an option.

WordPress FTP settings for AWS EC2

I have WordPress installed on AWS with EC2. I can connect via SFTP using FileZilla but if I try to update a plugin from within WordPress it asks me for the FTP details and I get the following error message:
ERROR: There was an error connecting to the server, Please verify the settings are correct.
I've read a lot of threads on here and followed a lot of steps to try to rectify, including:
added 2 new inbound Custom TCP rules to the EC2 Security Group; one for port 21 and one for ports 0-65000
added the following to my wp-config.ini:
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/var/www/');
define('FTP_CONTENT_DIR', '/var/www/wp-content/');
define('FTP_PLUGIN_DIR ', '/var/www/wp-content/plugins/');
define('FTP_USER', 'ubuntu');
define('FTP_PASS', 'my_password_obviously');
define('FTP_HOST', 'my.ip.obviously');
define('FTP_SSL', false);
still no luck. can anyone help?
Thanks
Sean
Since you are on ec2, you have full control of your instance. You can use direct setting for FS_METHOD as a means of updating the core and any plugins.
Although keep in mind that this can be somewhat insecure if you do not properly configure your instance (The webserver user should be isolated). You would also want to be sure that you can trust the plugins your are installing.
Amazon EC2 has some issues with FTP. See here for a solution to this common issue. However, this may not be your best solution. I go by the philosophy that the fewer ports I can open, the safer I am. Even if you are keeping it open only to your local IP, you are not completely safe from a DoS or some other malicious attack. Multiple checks are better than one, and fewer ports are better than more.
The issue is that FTP is that it was designed and implemented prior to any of today's security concerns. While you can make FTP more secure, and there are solutions on the web for this (like the one above), a better - and possibly MUCH easier - solution could be found in allowing FTPS over Port 22. Evidently, by installing and activating some packages you may be able to open Wordpress updates to a new option.
See here (not tested by me) for the FTPS solution which runs through Port 22 by binding to PHP through libssh2-php on Debian (or these steps on CentOS).

Deploying an ASP.NET web site to a remote VPS with Jenkins

I am just starting to get my head wrapped around continuous deployment with Jenkins, but I am running into some roadblocks and I haven't really found very many good, definitive resources on the topic in regards to ASP.NET applications.
I have set up a local build server than successfully pulls down code from a SVN repo, and builds it OK with MSBuild. This works well so far, but now I'd like to automate pushing this compiled code to a development server.
My problem is this - from what I gather based on what I read (which may be an incorrect assumption...) is that the staging server is typically within the same network as the build server, meaning you can share network resources, servers, etc.
In my case, I want to run the Jenkins server on a remote VPS, then deploy to other remote VPSes (so, essentially individual isolated machines communicating with each other).
I have seen alot of terms, but I am very new in my Sys Admin / DevOps type skills.
So, my question is this:
Is it even possible to, using Jenkins on a VPS, to then deploy to any particular server I choose? (I have full access to all of them, so if its a security thing, I can fix that... but they are not within the same network/domain)
What is the method to achieve this? I've seen xcopy, Web Deployment Packages (msdeploy), batch scripts, etc. mentioned, but not really a guidance behind what to use in what situations. Are any of these methods useful to achieve my goal?
Thanks for any help or guidance!
How is your Powershell? ;) You should check out psake.
psake is a build automation tool written in PowerShell. It avoids the
angle-bracket tax associated with executable XML by leveraging the
PowerShell syntax in your build scripts. psake has a syntax inspired
by rake (aka make in Ruby) and bake (aka make in Boo), but is easier
to script because it leverages your existent command-line knowledge.
psake is pronounced sake – as in Japanese rice wine. It does NOT rhyme
with make, bake, or rake.
You can deploy your files to the target server through SSH. Jenkins do support transfers through SSH. All you need to do is setting up a SSH server ex : CopSSH and a user account with admin permissions. and configuring the Jenkins to transfer through SSH.
Create host configurations in the main Jenkins configuration
Add an SSH Server
Add the public key to the remote server (the build server)
Click "Test Configuration"
Save
Configure a job to Publish Over SSH (Post Build Action)
Add Transfer Set.
Refer Publish Over SSH For More details

Remote File Read

How can I read a text file resides in a remote machine? There is no share exists in that machine and I am not allowed to create any share or file in the remote machine. Also I am not allowed to run any client program in the remote machine. My program is a ASP.net in C# residing in a IIS webserver. For linux machine we used ssh connections and file reads are easy. Is there something by default available in windows similiar to it ?
Thanks,
Sreejith
The first question to ask is if there's a good business reason to read that file. If yes, the IT people will have to allow you a reasonable solution to the problem.
I have frequently used SFTP (secure FTP) for this kind of problem. Unfortunately SFTP is not part of Windows, but there are free and low-cost SFTP servers available. Here's a list from Wikipedia
Explain to IT why you need access to that file and discuss options including SFTP. If you have a valid business reason for this and they will "not let you because of policy", it's the job of your project manager or boss to clear out that roadblock. Ask them to help.
Finally, consider whether it's practical for the file on the remote machine to be pushed to you instead of you pulling it. If you can setup a file share on your PC, ask them to setup a job on the remote server that copies the file to your file share every time it is changed.
You could try accessing the Admin share of the machine. Windows by default created a share for all disks (named C$, D$ etc). But in that case the application you write should be running with the credentials of a user with rights to that share ((local) administrators have sufficient rights to do that).
If that doesn't work you need to create a share or install software to get files from that machine (like FTP). This is all because of security, it's a good thing you are not able to just read a file from any machine...
I have done this many time with the Remote File port 34
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Resources