Update Wollok Server - uqbar-project/wollok GitHub Wiki
How to deploy a new version of the Wollok Server
There is a lot of room for improvement in this process, but we didn't have the time to make it perfect. If you see the problems, know how to improve it and have the time for the task... please don't hesitate!
Establish ssh connection
Connect by ssh to the production server using the deploy user.
ssh -i "~/.ssh/deploy-ec2" [email protected]
To do this you need ssh keys, please contact Pablo Tesone or Nicolás Passerini to obtain these keys.
Stop current server
Right now we have two running instances in the same VM, the "production" instance is listening in port 8080
and the test one listens in port 9090
.
To stop the server you have to find the right Java process and kill it.
You can look for it using netstat -tulnp | grep 8080
.
Or you can just killall java
to kill both servers.
Download and unzip new version
The production instance files are in /var/wollok
.
In that folder you have to download the latest version and unzip it.
You might want to delete the lib
directory of the previous version before unzipping a new one.
To do this, replace {version}
for the right version number (for example 1.8.4
) in the next script and execute it:
cd /var/wollok
wget https://wollokserverrepo.s3-us-west-2.amazonaws.com/master/org.uqbar.project.wollok.launch-{version}-wdk.zip
rm -rf lib
unzip org.uqbar.project.wollok.launch-{version}-wdk.zip
Warning: the current product generation has a bug and does not include the
bin
directory, do not delete it, as it contains files that you will need to run the new version. If you delete it by mistake, you'll need to get those files back from the wollok repository.
Run the server
bin/server.sh
Test
If you hit http://ec2-52-43-212-35.us-west-2.compute.amazonaws.com:8080/
with your browser you should see the updated version.
Debugging
In /var/logs/bin
there are logs for the server.