Vesta Automatic App Installer [Version 1.0.2] Topic is solved

Section with additional software for Vesta
pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby pandabb » Tue Jan 19, 2016 11:54 am

thank you very much skurudo.

skurudo
VestaCP Team
Posts: 7781
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby skurudo » Tue Jan 19, 2016 12:10 pm

pandabb wrote:thank you very much skurudo.


Glad to help, it's was pretty fun coding experience ;-)
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now

cdg
Posts: 26
Joined: Sun Aug 16, 2015 3:11 am

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby cdg » Wed Jan 20, 2016 11:16 pm

My server cannot send emails, is there any way that there could be a default password for all new installs, or could the password be shown on screen after installed?

skurudo
VestaCP Team
Posts: 7781
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby skurudo » Thu Jan 21, 2016 7:00 am

cdg wrote:My server cannot send emails, is there any way that there could be a default password for all new installs, or could the password be shown on screen after installed?


It's good feature request for joem ^_^
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now

joem
Posts: 373
Joined: Thu Nov 13, 2014 8:33 am
Location: New York
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby joem » Fri Jan 22, 2016 8:31 am

dvlpmt wrote:
joem wrote: Make sure /usr/local/vesta/bin/v-app has a permission set of 0755


Regarding Error code: 1, I've checked permissions and tried to reinstall couple of time - but it still won't install anything.

What I can see is that in Install Directory I have "/home/web/domain.xy/public_html" instead "/home/admin/web/domain.xy/public_html"

How to resolve this issue ?

Thank you for your efforts !


This error is templates based and has already been fixed in the new release. If you wouldnt mind letting me take a look other than the permission errors I dont know what would cause such a issue without more information. Whats your os?


cdg wrote:My server cannot send emails, is there any way that there could be a default password for all new installs, or could the password be shown on screen after installed?


Already done will be in next release

joem
Posts: 373
Joined: Thu Nov 13, 2014 8:33 am
Location: New York
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby joem » Fri Jan 22, 2016 8:59 am

grenadecx wrote:This App Installer looks really neat. However it wont install any apps, it always comes back with

Code: Select all

Installation Issue: WordPress has mysql import problems.


I suspect this have something with to do with me running the sql server on another server then vestacp. It would be nice if we could choose what sql server we wanted to use or if there are only one it would choose the one available.

Looking forward what the updates might bring!

Edit:
I found the problem in /usr/local/vesta/func/app-installer/base.sh

Code: Select all

APPI_DB_HOST="localhost"


After changing that to the mysql ip it worked wonders. Still, I think this should be autodetected based on the same configuration file vestacp uses. Thanks!


I like this ideal alot and played around with it ran into a few big issues but I will give it another try.

grenadecx
Posts: 15
Joined: Sat Jan 09, 2016 6:23 pm

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby grenadecx » Sat Jan 23, 2016 2:53 am

joem wrote:I like this ideal alot and played around with it ran into a few big issues but I will give it another try.


What kind of issues did you run into? Maybe I can help out. Do you have this project on github or something like that?

I wanted to add some packages myself and it looks relatively simple when I look through it, any quick pointers on it?

Some other idea regarding the installer. It requires that the install directory is completely empty to continue. How about letting it do the install if there only are index.html and robots.txt (let it remove those files before install) in the directory? This would allow us to create a domain and do the install without the need to ftp and remove the default files.

joem
Posts: 373
Joined: Thu Nov 13, 2014 8:33 am
Location: New York
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby joem » Sat Jan 23, 2016 8:25 am

grenadecx wrote:
joem wrote:I like this ideal alot and played around with it ran into a few big issues but I will give it another try.


What kind of issues did you run into? Maybe I can help out. Do you have this project on github or something like that?

I wanted to add some packages myself and it looks relatively simple when I look through it, any quick pointers on it?

Some other idea regarding the installer. It requires that the install directory is completely empty to continue. How about letting it do the install if there only are index.html and robots.txt (let it remove those files before install) in the directory? This would allow us to create a domain and do the install without the need to ftp and remove the default files.


Well I take that back the WAI will now check for host and character set. I will work on the removal of default files over the weekend.

I will use wordpress for my example because its the easiest one to do.

To add an app
  • First download the source package and unzip it.
  • Install it export the database to app_data.sql
  • The hard part is converting the users password using mysql because each app uses a different password scheme also many script require custom edits so you will need to read each apps installation files
  • Replace WordPress_4.3 with the new app name and version
  • I commented the code below sorry I have been up for whats seems to be days now so if you have questions just pm them to me.

function INSTALL_WordPress_4.3() {

# This set the link for the admin panel for the script in this case wordpress only for email purpose
APPI_QST="wp-admin/"

# y = yes there is a database mysql make sure the app_data.sql file exists
# wp-config.php = check the make sure config file exists
# n = rename config file in this case I have already updated the wp-config.php so its set to no
# to rename the config file simply replace n with the new name ex. wp-config-sample.php
BASE_INSTALL_START "y" "wp-config.php" "n"

#make new database
NEW_DB

#this mess edits app_data.sql to the users submitted data and the new datbase details
sed -i "s/##CHARSET##/$APPI_DB_CHAR/;s%##TPREF##%$APPI_DB_TPREF%;s%##SITEURL##%http\:\/\/$APPI_USER_DOMAIN$APPI_USER_INSTALL%;s/##ADMIN_PASS##/$APPI_SD_PASS/;s/##ADMIN_EMAIL##/$APPI_SD_EMAIL/;s/##ADMIN_USER##/$APPI_SD_USER/g" $APPI_USER_INSTALLDIR"app_data.sql"

#this mess edits wordpress config file to the users submitted data
sed -i "s/database_name_here/$APPI_DB_NAME/;s/username_here/$APPI_DB_USER/;s/password_here/$APPI_DB_PASS/;s/localhost/$APPI_DB_HOST/;s/utf8/$APPI_DB_CHAR/;s/wp_/$APPI_DB_TPREF/g" $APPI_USER_INSTALLDIR"wp-config.php"

#this mess imports wordpress salt not needed for any other script
printf '%s\n' "g/##PLACE_WP_SALT##/d" a "$(curl -sL https://api.wordpress.org/secret-key/1.1/salt/)" . w | ed -s $APPI_USER_INSTALLDIR"wp-config.php"

#Change the config file permissions do other steps for script installation in this case little to none
chmod 600 $APPI_USER_INSTALLDIR"wp-config.php"

#import app_data.sql
IPORT_DB

}

grenadecx
Posts: 15
Joined: Sat Jan 09, 2016 6:23 pm

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby grenadecx » Tue Jan 26, 2016 5:52 pm

@joem
Thanks, works really neat!

I'm gonna do a few packages of some projects I like and release them here if anyone else wants to use them.

By the way, during testing with the current packages already available I did stumble upon a gateway timeout with nginx when doing the prestashop install. It did finish install after a while however, so timeout was probably because it took more then default 30sec? Or something like that. My guess it that php-fpm is the culprit and it might be possible to just increase the timeout during runtime when it comes to install with php set_time_limit, unless php runs in safe mode.

joem
Posts: 373
Joined: Thu Nov 13, 2014 8:33 am
Location: New York
Contact:

Re: Vesta Automatic App Installer [Version 1.0.2]

Postby joem » Wed Jan 27, 2016 7:31 am

grenadecx wrote:@joem
Thanks, works really neat!

I'm gonna do a few packages of some projects I like and release them here if anyone else wants to use them.

By the way, during testing with the current packages already available I did stumble upon a gateway timeout with nginx when doing the prestashop install. It did finish install after a while however, so timeout was probably because it took more then default 30sec? Or something like that. My guess it that php-fpm is the culprit and it might be possible to just increase the timeout during runtime when it comes to install with php set_time_limit, unless php runs in safe mode.


Yes this is a known issue I think I have a fix for it without needing to update any config files but in the mean time you can just update the value as you stated. (side note: even if the timeout occurs all installations will complete unless there is some other error which at this point if there is any errors its due to a bad app package all other errors are processed before the timeout.) As for set_time_limit this command does not seem to work on all servers and I try to make this work for all Vesta users. If you do make some new packages I would be more than happy to add them and give you credit any help is greatly appreciated.


Return to “3rd Party Software”



Who is online

Users browsing this forum: No registered users and 3 guests