What is the process to start jupyterhub automatically? - jupyter-notebook

I have installed a jupyterhub on my subdomain. Whenever I have to use jupyterhub I have to run a command jupyterhub on ubuntu terminal if it is closed we are not able to access it.
SO, is there any way to start jupyterhub automatically when system start?
Version:
UBUNTU 16.4,
anaconda 5.1.0,
jupyter notebook --version 5.4.0,

There are a few ways to accomplish this - what you are essentially looking for is how to run a script or start a service at system boot.
Depending on your comfort level with unix you can choose which option you want.
http://upstart.ubuntu.com/
configure jupyter as a service and start the service at boot time
setup jupyter notebook as a service
start service at system reboot

Related

Airflow installation problems

So, I'm trying to install Airflow on my laptop and I was able to do that using WSL but I can't seem to open it.
My webserver is running but I cant open it on localhost:8080
The system is taking eons to run airflow scheduler

AWS CodeDeploy deployment failed at event ApplicationStop

I am trying to set up auto-deployment from GitHub to AWS, using EC2.
I set Role with CodeDeployServiceRole auto policy
After following the Tutorial: Use AWS CodeDeploy to Deploy an Application from GitHub, my deployment fails at the ApplicationStop event, after trying for couple of minutes with error code HEALTH_CONSTRAINT. I'm not sure how to troubleshoot the issue/where to look.
These are few hints of how you can navigate your way
Logs as mentioned in comments in /var/log/aws/codedeploy-agent
As AWS support recommend you can add for one time --ignore-application-stop-failures so it will skip that step in case it failed last time and see، because the application stop Lifecycle event uses the appspec file from the last successful build so if that one is corrupted somehow this step will fail in the following builds
(not recommended) you can delete the file, that CodeDeploy uses to keep track of the previous successful deployment in the following path /opt/codedeploy-agent/deployment-root/deployment-instructions/
Check the latest logs at /var/log/aws/codedeploy-agent
If your deployment is failing at ApplicationStop event, then most likely the issue is your EC2 instance does not have the necessary permissions to get the artifacts from S3 bucket.
Your EC2 instance must have an IAM role attached which gives it enough permissions to download the artifacts from S3 bucket
Your EC2 must be started with an IAM role. So you may have to reboot your instance after attaching the role to it.
From your configuration, looks like you have provided permissions to CodeDeploy to perform certain actions on your EC2. You may want to check if your EC2 also has the necessary permissions to download packages from S3 bucket.
Another reason for this error is that the CodeDeploy Service is not running on your machine. On Windows machines, Code Deploy Service terminates sometimes, and as a result, the deployment is not downloaded on the machine. Nothing appears in the logs either.
Run services.msc and check the code deploy agent service. If it is not running, start it and retry the deployment.
I had the same issue and solved it by solving codedeploy-agent that wasn't working on my EC2 instance.
sudo service {httpd/apache2} status
Something might have cause the agent not to run properly
Hope it will help
I had the same issue. You also need to make sure that your EC2 instance has code-deploy-agent installed.
Follow the below aws guide. It worked for me.
AWS guide to install code agent in linux server
Check if the codedeploy-agent is running.
sudo service codedeploy-agent status
if not running then use below command to run
sudo service codedeploy-agent start
If you are using aws Windows server, check the logs at :
C:\ProgramData\Amazon\CodeDeploy\log\codedeploy-agent-log.txt
AWS Docs
To check if the codedeployagent running in windows. Open powersheel command window and run these command.
powershell.exe -Command Get-Service -Name codedeployagent
Better to stop and start again.
powershell.exe -Command Stop-Service -Name codedeployagent
powershell.exe -Command Start-Service -Name codedeployagent
Or Restarting also works
powershell.exe -Command Restart-Service -Name codedeployagent
For me I had to uninstall the codedeployagent on windows by uninstalling and deleting old files of codedeploy.
Run the below command in powershell one by one to uninstall.
wmic
product where name="CodeDeploy Host Agent" call uninstall /nointeractive
exit
After this delete the codedeploy folder at this location.
C:\ProgramData/Amazon/CodeDeploy/
Now install codedeployagent on windows.
Start the codedeployagent again.
powershell.exe -Command Start-Service -Name codedeployagent

Fail to install Microsoft Cosmos/DocumentDB emulator docker container - unkown blob

enter image description hereI've just installed Docker for Windows on latest Windows 10 Pro. Docker starts and passes the install tests eg docker run hello-world. However, i am unable to successfully download and run the Microsoft DocumentDB emulator. I've followed the instructions:
"Once you have Docker for Windows installed, you can pull the Emulator image from Docker Hub by running the following command from your favorite shell (cmd.exe, PowerShell, etc.)"
docker pull microsoft/azure-documentdb-emulator
From screenshot you can see that the container downloading fails with an "unknown blob" error. Any ideas on how to fix this?
Thanks.
When you run "docker version" in cmd.exe, is the server version Linux/amd64? If so, you need to switch so that the server OS is Windows. To do that, go to the taskbar and right click the docker whale icon, and then click "Switch to Windows containers". You'll then have to restart your machine.

shiny-server on Fedora

I'm working with Shiny on a Fedora 19 box, and while I can build my applications and run them from RStudio, getting shiny-server to behave has proven trickier. I've built shiny-server from source and have it installed such that I can start is manually easily enough. But, once I exit the terminal window from whence I started shiny-server, it stops and my apps no longer work.
I've tried to work with systemd to create a shiny.service file and enable the service through systemctl as described here:
https://groups.google.com/forum/#!topic/shiny-discuss/sTUmUL7znWg
but that failed.
How do I register shiny-server as a service that will automatically run on boot up?

Install IPython notebook on a remote server without root privileges

I need to deploy IPython Notebook on an Ubuntu remote server.
One solution is to deploy it as a local user, without sudo privileges, on a system where other servers are already running.
The second solution is to setup a new server, and install IPython with sudo privileges.
I'd like to know before to start, if there are some requirements related to the IPython Notebook server deployment that can make solution 1 difficult.
I found these tutorials particularly useful when setting up IPython nbserver:
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch
Running a notebook server
They don't require sudo privileges. You can also try setting up virtualenv to encapsulate the environment to the local user. However, it is necessary to set the port where Notebook can be accessed from the outside, so there can be potential conflict if you're not able to expose ports on the server.

Resources