Ho Do I Restart Sitecore Server From Code? - sitecore

We have a requirement to install Sitecore packages programmatically from a custom admin page. The package installation is working but once the package is installed I wanted to restart the Sitecore server from code.
Sitecore.Install.Installer installer = new Sitecore.Install.Installer();
I tried with installer.ExecutePostStep but not sure what action I need to provide to this function.
If anyone has done it before Please help .
Basically I wanted to execute the functionality from code what the two below check boxes are doing when we do manual installation.

The easiest thing will be to restart the Sitecore's application pool by a Restart-Application PowerShell command.
Find more details here.

Related

Coldfusion - JEE Installation - JVM Arguments which and how?

We are trying to change how we manage our QA Enviroments.
Till now we have installed Coldfusion using the Adobe Installer that install a modified Tomcat.
We want to manage the QA server using CommandBox Tool that installs Coldfusion in JEE install mode using war file, but situation will be similar with any of the supported JEE Application Server. (EAP, Wildfly, Tomcat).
We have little experience in using Coldfusion in the JEE install mode then several questions arise regarding the JVM Settings.
Below the JVM Setting we got after install CF using the Adobe Standard installer, accessing the Coldfusion (CF) Administrator (here for a fresh installation of a CF2018):
--add-modules=java.xml.ws
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/sun.util.cldr=ALL-UNNAMED
--add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
-Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes
-Dcoldfusion.home={application.home}
-Dcoldfusion.jsafe.defaultalgo=FIPS186Random
-Dcoldfusion.libPath={application.home}/lib
-Dcoldfusion.rootDir={application.home}
-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true
-Djava.awt.headless=true
-Djava.locale.providers=COMPAT,SPI
-Djava.security.auth.policy={application.home}/lib/neo_jaas.policy
-Djava.security.policy={application.home}/lib/coldfusion.policy
-Djava.util.logging.config.file={application.home}/lib/logging.properties
-Djdk.attach.allowAttachSelf=true
-Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true
-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog
-Dsun.font.layoutengine=icu
-XX:+UseParallelGC
-XX:MaxMetaspaceSize=192m
-Xbatch
-Xdebug
-Xms256m
-Xmx1024m
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6006
-server
Q1. the Coldfusion war have inside it the JVM settings (we have written above) and will apply it during deploy?
Q2. if answer to is no!, what are the settings that are applicable according the JEE Application Server used (i.e. some settings are ok for Tomcat but meaniless for wildfly).
We were able to find specific documentation from Adobe for Coldfusion 2018 (https://helpx.adobe.com/it/coldfusion/installing/coldfusion-2018-install-jee-configuration.html).
The number of settings is incredible low comparing with the standard one!:
-Djava.locale.providers=COMPAT,SPI
-Dcoldfusion.disablejsafe=true
-Djdk.attach.allowAttachSelf=true
-Djdk.serialFilter= !org.mozilla.**;!com.sun.syndication.**
We were not able to find similar documentationfor Coldfusion 2021 (latest release).
Till now trying to get help from Adobe has been produce not effective results.
Thanks in advance
Adobe isn't going to help you support an installation via CommandBox, you need to talk to Ortus Solutions about that. Every JVM setting available in CF Admin for Standard is not displayed in the UI for CF Enterprise. You're looking for the CF install folder for the instance you have (non-CB version), find a file called jvm.config.
https://www.cfguide.io/coldfusion-administrator/server-settings-java-jvm/
In ColdBox, you can set everything via the command line or use a server.json file to do that same configuration.
https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/jvm-args
Here's an example from a CB install I have on a Mac where I'm running an older version of CF that requires an older JDK, but I've also set the heapSize.
{
"jvm": {
"javaHome": "/Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home",
"heapSize": 1024
}
}
What I would suggest is
export your existing CF Admin settings to a .car file
log in to your ColdBox server's CF Admin
import the .car file
adjust all the settings (DSN, etc) for your QA server
go to the command line and install the CFConfig plugin
export all the CF Admin settings to a JSON file (instructions in their docs)
save that to a private repo or your secrets / passwords vault.
Join the BoxTeam Slack where you can find the CommandBox community and ask more questions.

Openedx Native installation : theme change not working

I have installed openedx using Native installation method. Now I want to change the default logo. As a test, i removed the logo from the folder /edx/app/edxapp/edx-platform/lms/static/images.
But when i open the localhost, its still there. (lms view).
In inspect view, the logo name appears as /static/images/logo.b6c374d66d57.png.
The same operation when I perform in devstack, The logo changes successfully.
What am I missing?
Since I am using the default theme, I think I don't need to configure anything regarding theme customization.
Ok, I am posting the answer as I figure it out. Maybe helpful for someone.
The application was service data from cache and I had to recompile the theme again. Following are the steps to compile the theme.
sudo -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --settings=aws
If there are changes in cms contents, execute
paver update_assets cms --settings=aws

How to make update in Django webservice made in python on windows

I have installed Python 27 successfully.
And with respect to project requirement i have also installed following packages.
Django==1.4.3
MySQL-python==1.2.4
PIL==1.1.7
South==0.7.6
argparse==1.2.1
distribute==0.6.28
django-appconf==0.6
django-imagekit==2.0.2
pytz==2012j
six==1.2.0
wsgiref==0.1.2
Now the problem is, i dont know how to make this run, or visible in python.
Can anybody please help me, to get out from this.
I have to change few webservices and also want to add some functionality.
This webservices are attached with wordpress website.
So, please help me to configure whole this project on local (Windows PC).
Thanks in advance
Go for the Touch Command of Django for this issue,
I think it will make helpful to you.
Thanks!
i have solve this, find below instruction for users who have same queries:
Restarting the Spawned Server
If you change any Python code on your site, you’ll need to tell FastCGI the code has changed. But there’s no need to restart Apache in this case. Rather, just reupload mysite.fcgi – or edit the file – so that the timestamp on the file changes. When Apache sees the file has been updated, it will restart your Django application for you.
If you have access to a command shell on a Unix system, you can accomplish this easily by using the touch command:
touch mysite.fcgi
For more information:
http://www.djangobook.com/en/2.0/chapter12.html
Thanks

Uninstall Plone/Zope

I am testing different CMSs, and installed Plone 4 in my server. It is not my chosen one, and I now can´t find a way to uninstall it. I would like a full uninstall.
Regards: Miguel
If you used the Unified Installer, you simply delete the directory and you are done. Plone does not install anything outside of that.
If you used another method to install Plone, you'll need to give more details than that, including the OS you installed it on.
Just for the record - if you installed Plone on Windows with the official Plone Installer for Windows (ie, downloaded from plone.org), you should use the "Add/Remove Programs" entry for Plone. Simply deleting the Plone folder won't remove the Start Menu shortcuts or the Windows Service for the Zope Server.
If you've done a ZEO install, you may want to remove the group 'plone_group', and the users 'plone_buildout', and 'plone_daemon'. Just some more advice for cleaning Plone off your system...

Mylyn & Redmine Integration

I'm trying to get Mylyn and Redmine work together so I can manage tasks right inside Eclipse. I saw this on redmine wiki http://www.redmine.org/wiki/redmine/HowTo_Mylyn but I think it's for the old version of Mylyn.
I can't find the Generic Web Connector plugin for Mylyn but there's this Web templates plugin. I think that one replaced the Generic Web Connector. But it's quite different from the screenshots posted at the Redmine wiki. There's no Task URL, New Task URL, etc.
Here is what you are looking for:
http://sourceforge.net/projects/redmin-mylyncon/
A Mylyn connector specially for RedMine. It works fine with eclipse ganymede.
The update site is: http://redmin-mylyncon.sourceforge.net/update-site/N/
Here are the steps to perform integration between Eclipse Mylyn and Redmine.
I assume that Eclipse, Mylyn and Redmine are already installed, the latter somewhere in $REDMINE_HOME. Tested with Eclipse 3.7 and Redmine 1.2.1.
Summarily, you need to install an Eclipse plugin AND a Redmine plugin.
Go to $REDMINE_HOME/vendor/plugins and run
git clone git://redmin-mylyncon.git.sourceforge.net/gitroot/redmin-mylyncon/redmine-mylyn-connector
(Re)start the server, and in Redmine under Administration/Plugins the Mylyn Connector Plugin should be listed
Again in Redmine, under Administration/Settings/Authentication, check the "Enable REST web service" field
In Eclipse, install the Eclipse connector via its update site
http://redmin-mylyncon.sourceforge.net/update-site/N/
Create your repository and check that it connects, then you are good to go!
See this manual.
http://wiki.eclipse.org/index.php/Mylyn_Extensions
Eclipse Menu.
Help -> Software Updates ... -> Add Site...
http://download.eclipse.org/tools/mylyn/update/incubator
http://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn
http://danmunn.github.com/redmine_mylyn_connector/
https://github.com/danmunn/redmine_mylyn_connector
As of july 2012 now there is a new dedicated Redmine-Mylyn-Connector under active development for Redmine 2.x! (Got to admit, I haven't tested it yet.)
I am in the process of testing the 1.x connector that can be found on sourceforge, I will edit this post once I am done.
EDIT:
The update-site for the mylyn-plugin from the link in the accepted posting works.
As well as the mylyn-connector for the redmine installation. (Tested with 1.3.2 installation, don't forget to restart the web server after installing it. ;))
But both things aren't working out... once the mylyn-connector is installed, the web-interface is not working anymore. ;(
EDIT2:
The special connector works with 2.x and Mylyn finally looks proper.
http://danmunn.github.com/redmine_mylyn_connector/ the redmine server plugin.
http://kenjiru.ro/blog/2012/02/install-the-redmine-mylyn-connector-for-eclipse another server plugin link and the eclipse connector plugin
Will look like this.
As of yesterday, Sven has taken down the update site (if you go there, you'll find nothing) since someone reported him to Sourceforge (see https://sourceforge.net/tracker/?func=detail&aid=3441532&group_id=228995&atid=1075435).
So, there are NO binaries available now for Eclipse. Does anyone know of alternative ways to get these plugins? I have no clue how to compile.
The GIT and SVN repositories are there, but again as I sad, I'm not a java programmer. Can anyone offer Sven a site where he can store the binaries as an Update?
For retrieve redmine mylyn connector
https://github.com/ljader/redmine-mylyn-plugin
In eclipse juno 4.2
"Install new software" and as local archive like in this post :
How to install plugin for Eclipse from .zip
Also a good read from redmine.
HowTo connect a Mylyn repository to Redmine:
http://www.redmine.org/wiki/1/HowTo_Mylyn
download.eclipse.org/tools/mylyn/update/incubator wont work anymore, for the new update sites look at http://www.eclipse.org/mylyn/downloads/
The Web Connector could be found via http://download.eclipse.org/mylyn/incubator/3.5