HelioNetworks / HelioPanel_archived

HelioPanel is a control panel offered to the user's of HelioHost's services powered by Symfony2.
http://www.heliohost.org/heliopanel
6 stars 2 forks source link

Add a Django Apps Manager #79

Open xaav opened 13 years ago

xaav commented 13 years ago

A Django Apps Manager is needed because:

The Django apps manager will solve this problem.

The bundle implementing this feature will be called HelioNetworksDjangoAppsManagerBundle. This bundle will use the hook API to transfer the necessary files to the home directory. The Bundle will create a new Icon to link to the home page of the bundle.

Dependencies:

JJE-Admin commented 13 years ago

Great idea :) Although I have no clue what Django is! xD

xaav commented 13 years ago

http://www.heliohost.org/home/features/languages/python

Django, on the other hand, is probably the hardest scripting feature to configure on HelioHost. If you have not yet created a Django application, we suggest that you develop at home and upload to HelioHost after you are finished. This is because the use of the command-line utility django-admin.py is common during the development process, and HelioHost does not allow command-line access to its users. Development can be done without this utility, however. If it is your wish to develop on-site you will need to manually create a blank __init__.py file, a settings.py file, and a urls.py file. To learn more about these files try the learning links provided above.

This issue is really trying to fix this problem, trying to make Django easier to use.You don't really need to know anything about Django to do this, all you need to do is do what is listed on that page, except code it into a script.

xaav commented 13 years ago

@jje-admin Would you like to do this?

You can refer to the docs, and ask me if you have any questions.

JJE-Admin commented 13 years ago

I'll give it a go, but I've been busy recently. Hopefully I'll get round to it as soon as I can :)

JJE-Admin commented 13 years ago

Hi xaav,

I was wondering if you could help me with something. I barely know Django and I barely know Symfony, so how can I test that it actually works and looks like I hope it will?

Also, what would the Django App Manager do? I'm guessing it will 'start' apps like you have explained in your post above. Is there any need for a 'list' of applications, like the File Manager? Also, will it need to 'stop' apps?

Thanks

xaav commented 13 years ago

I was wondering if you could help me with something. I barely know Django and I barely know Symfony

You don't need to know Django to implement this. I'll explain in a bit. However, you do need to know Symfony2, and I was hoping this would be a learning opportunity for you.

so how can I test that it actually works and looks like I hope it will?

Did you read the docs? I wrote some (I hope) helpful documentation on setting up your development environment.

Also, what would the Django App Manager do?

The Django app manager will create blank django apps in the folder of the user's choice.

I'm guessing it will 'start' apps like you have explained in your post above.

No stopping/starting Django apps, since they are invoked via mod_wsgi. Refer to our own website.

Is there any need for a 'list' of applications, like the File Manager?

It's up to you, you're developing this. I think making a "list" would actually be harder, so I would probably save that for later. You only have to do what the issue says, nothing more. If you would like to do more, that's fine, there are no problems with that, but chances are you'll only make things harder.


Keeping all this in mind, after you have set up your development environment, just run php app/console generate:bundle inside your development environment to get started. If you have any more questions, please post back, I'm happy to answer them.

JJE-Admin commented 13 years ago

Hi, thanks for that! :-) I tried installing HelioPanel with bin/vendors and adding stuff to the HOSTS file and it worked perfectly. However, when I add the VirtualHost section to D:\xampp\apache\httpd.conf , the whole of my localhost suddenly returns 403 Forbidden (including heliopanel.com).

Thanks,

xaav commented 13 years ago

Sorry about that. Please add this to your httpd.conf file:

<VirtualHost 127.0.0.1>
DocumentRoot /path/to/htdocs
ServerName localhost
</VirtualHost>

Then, run the following commands:

$ cd /path/to/heliopanel
$ git pull
$ php bin/vendors install
JJE-Admin commented 13 years ago

Hi. I tried inserting your code into httpd.conf instead of the old one, and localhost/heliopanel.com both had the same contents (/xampp/htdocs). However, when I then went back into httpd.conf and added the old code, localhost showed 404 and heliopanel.com showed 403!

Thanks,

EDIT: Also, I'm using Windows Vista

xaav commented 13 years ago

I tried inserting your code into httpd.conf instead of the old one

You were supposed to add it instead of replacing the old code.

However, when I then went back into httpd.conf and added the old code, localhost showed 404 and heliopanel.com showed 403!

Good. Have you run the commands I posted above?

JJE-Admin commented 13 years ago

This is really confusing me now... I now have these two virtualhost at the bottom of my httpd.conf

<VirtualHost 127.0.0.1>
DocumentRoot /xampp/htdocs/panelgit/HelioPanel/web
ServerName heliopanel.com
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /xampp/htdocs
ServerName localhost
</VirtualHost>

...and both localhost/ and heliopanel.com/ is showing 500 Internal Server Error. Yet it was working before! I have also tried running the commands you posted above; still 500 error.

xaav commented 13 years ago

I've just made some changes to the .htaccess code. Please run git pull.

JJE-Admin commented 13 years ago

Now both localhost/ and heliopanel.com/ are showing 500 Server Error. Previously, xampp generated a 500 Internal Server Error, but this time Google Chrome has shown a Server Error.

xaav commented 13 years ago

Good! We're making progress. Please visit http://heliopanel.com/app_dev.php to find out the cause of the error.

JJE-Admin commented 13 years ago

Good to hear :) app.dev gives the following error:

Whoops, looks like something went wrong.
1/1 ParameterNotFoundException: You have requested a non-existent parameter "api_key".

1. in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 95
2. at ParameterBag->get() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 209
3. at ParameterBag->resolveString() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 180
4. at ParameterBag->resolveValue() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 170
5. at ParameterBag->resolveValue() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 170
6. at ParameterBag->resolveValue() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 170
7. at ParameterBag->resolveValue() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass.php line 37
8. at MergeExtensionConfigurationPass->process() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass.php line 39
9. at MergeExtensionConfigurationPass->process() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\Compiler\Compiler.php line 119
10. at Compiler->compile() in D:\xampp\htdocs\panelgit\HelioPanel\vendor\symfony\src\Symfony\Component\DependencyInjection\ContainerBuilder.php line 436
11. at ContainerBuilder->compile() in D:\xampp\htdocs\panelgit\HelioPanel\app\bootstrap.php.cache line 868
12. at Kernel->buildContainer() in D:\xampp\htdocs\panelgit\HelioPanel\app\bootstrap.php.cache line 779
13. at Kernel->initializeContainer() in D:\xampp\htdocs\panelgit\HelioPanel\app\bootstrap.php.cache line 513
14. at Kernel->boot() in D:\xampp\htdocs\panelgit\HelioPanel\app\bootstrap.php.cache line 544
15. at Kernel->handle() in D:\xampp\htdocs\panelgit\HelioPanel\web\app_dev.php line 20
xaav commented 13 years ago

Open app/config/parameters.ini and add the following lines:

api_key = "RANDOM_KEY"
api_url = "api.php"
JJE-Admin commented 13 years ago

Woo hoo: we have a login box! However, I cannot login: it says 'Type in your existing cPanel creditentials' and I have typed in my Stevie information, but then it says:

We could not verify that the account exists or that the password is correct.
xaav commented 13 years ago

Yeah, this is because #94; I'll post back when I have that fixed.

JJE-Admin commented 13 years ago

Thanks @xaav :)

At the moment I'm having a few issues with the httpd.conf setup on my xampp install. Whenever I go to localhost or heliopanel.com, it goes to the HelioPanel login. However, I would like localhost to point to /xampp/htdocs while heliopanel.com points to /xampp/htdocs/path/to/heliopanel/web - is this possible?

Thanks

xaav commented 13 years ago

Did you add a VirtualHost for localhost?

JJE-Admin commented 13 years ago

@xaav: I mentioned the code I inserted into httpd.conf on Sept 24th:

https://github.com/HelioNetworks/HelioPanel/issues/79#issuecomment-2185449

xaav commented 13 years ago

I'm not sure what's happening. It seems to be working on my machine.

xaav commented 13 years ago

Reassigning so that I can work on some other issues...

JJE-Admin commented 13 years ago

I think that issue is fixed, so I ran the code you posted on 23rd September (git pull, php bin/vendors install) to retrieve the latest copy. Unfortunately I am still having the same problem with the login script:

"We could not verify that the account exists or that the password is correct."

xaav commented 13 years ago
  1. Are you accessing from app_dev.php?
  2. If so, please post the contents of app/logs/dev.log (Or PM me if you prefer).
JJE-Admin commented 13 years ago

This is weird, I tried with heliopanel.com and it sent me to a failure page with a link to the GitHub website. Then I tried it with app_dev.php and it worked fine. Anyway, the point is that I can now login, and I'll start on this as soon as 0.8 Beta is compelete. :)

JJE-Admin commented 13 years ago

Actually when I try accessing any functions such as the File Manager, I see:

Fatal error: Call to a member function setLogger() on a non-object in D:\xampp\htdocs\panelgit\HelioPanel\src\HelioNetworks\HelioPanelBundle\Controller\HelioPanelAbstractController.php on line 33

xaav commented 13 years ago

Yeah, the dev version is broken right now, but it really doesn't matter since panel.helionet.org is fine.