Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an upgrade process for Engelsystem similar to Wordpress #162

Open
5 of 6 tasks
mariobehling opened this issue Jul 12, 2016 · 9 comments
Open
5 of 6 tasks

Comments

@mariobehling
Copy link
Member

mariobehling commented Jul 12, 2016

Please research and propose the upgrade process similar to that of Wordpress. Then:

  • Implement it for Engelsystem in a similar way
  • Give the option in the UI to upgrade
  • Show an icon "update" if updates are available
  • in settings give the option "deactivate updates" and "automatic updates"
  • Write code tests
  • Write a blog post about how Wordpress upgrades work and how you implemented it in the same way in Engelsystem. Include images and code info.
@DishantK1807
Copy link

Research on documentation of wordpress on implementing update procedure. Wordpress is a CMS and it uses it's own CMS framework for pushing the updates to every server. It pushes updates using SVN and got the steps of wordpress installation through SVN here, https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/from-svn/

Wrodpress uses it's own CMS framework to push auto updates. We don't have any such framework to get auto updates. http://code.tutsplus.com/tutorials/a-guide-to-the-wordpress-http-api-automatic-plugin-updates--wp-25181

I'll going through the code of wordpress, https://github.com/WordPress/WordPress , if I am able to review complete code to find the upgrade process.

Went through stackoverflow, but the answers that I got, cannot be implemented on our system, as we don't use any framework like Wordpress.
http://stackoverflow.com/questions/9053763/how-to-create-a-automatic-update-component-in-php
http://stackoverflow.com/questions/2439160/how-to-self-update-phpmysql-cms

Will be posting my queries on stackoverflow and wait for answers.

Till then I'll work on how to implement it manually on the system. To get the notification if an update is available.

Will research on how to get version numbers from github to a server.

@mariobehling
Copy link
Member Author

@DishantK1807 This is related to #163 So, we can define our framework through this model.

@mariobehling
Copy link
Member Author

Will research on how to get version numbers from github to a server.

We do not need version numbers. It is possible to make releases though.

@DishantK1807
Copy link

DishantK1807 commented Jul 16, 2016

Yes we can do it throught releases.

I've got different scripts and methods that we could use to implement upgrade process:

These links will help in understanding the process:

So what we need now is to implement:

  • Define a proper framework for the system first, Implement MVC model #163
  • Define a proper system to automatic installation, here we would be requiring scripts to install the system automatically(like wordpress) , Implement an installation flow similar to wordpress #161
  • Have database migrations to update the database without any loss of data during the update process.(That we already have in our system)
  • Use one of the scripts to install the updates.
    • We will provide a checkbox to enable/disable auto updates in the admin settings page (We already have a different settings page for admin)
    • We will display notification in the alert box of the admin if the updates are available

@DishantK1807
Copy link

We now have a more members in the team, we can complete issues #163 and #161 faster and implement this feature. I'll work with @kamishettysreeja25 to complete the issues faster, by dividing the tasks.

@DishantK1807
Copy link

Researched more online for this issue and checked many other projects to find a solution to this problem and found a solution to it.

  • Manually creating a file which will contain the Version Number, which will be updated every time a change is made to the fossasia/master.
  • Create a script update.sh which will pull from the fossasia/master and to local repo.
  • Running that script in index.php file, so that it is executed everytime we open the Engelsystem to check for updates.
  • Checking the Version number from the file in FOSSASIA repo and the file in LOCAL repo, if there would be change, the script would run and pull from fossasia/master
  • Providing a manual update option in the Admin Settings page which will call the same funcation
  • If an update is available, a push notification will be posted in the alerts only for the admin.
  • Sreeja will be writing an installation script for migrating the Database. That same script can be used for migrations if there would be any changes in the database.

@DishantK1807
Copy link

Fixed here: #220

@DishantK1807
Copy link

Will write a blog post on it now

@DishantK1807
Copy link

This issue is completed and can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants