I am running R on a Windows computer. I find myself making many JSON requests to datasciencetoolkit.org and I recently discovered that datasciencetoolkit.org can be downloaded to a computer as a "virtual server." I imagine this could cut down on my calculation time significantly, not to mention that it won't burden someone else's servers with my queries.
The trouble is, I know nothing about creating my own virtual machine. Here is the guide for beginning. I am planning on using Vagrant since I don't believe Amazon is free (please correct me if I'm wrong.) I am going to keep it to 3 questions.
1) I already downloaded Vagrant and ran the step that says:
vagrant box add dstk http://static.datasciencetoolkit.org/dstk_0.50.box
...from within my own computer, not a virtual machine. I installed it to my own computer I think. Did I make a mistake? Do I need to do that over again?
2) How do I set up Vagrant on VirtualBox? I don't even know what that should look like.
3) Do I need to install R on the Virtual Machine as well? I am assuming that once all is done I will just need to run my requests in the virtual machine by typing in the http://localhost:8080 address, but I will cross that bridge when I get to it. Right now I just want to set up my virtual machine with the datasciencetoolkit.
Thank you!!
Installing Vagrant for Windows
Vagrant is a tool to help you use VirtualBox more easily and consistently.
VirtualBox is a free program which hosts and manages virtual machines. Vagrant
looks for a file called Vagrantfile, which is a construction plan that takes a
basic or pre-configured system image, configures it according to your plan, and
then hosts it via VirtualBox.
I assume you have some "power user" comfort with Windows. If you find it
difficult to model what's going on, it may be possible that this toolchain could
bring on more pain than doing things manually.
Download a ssh client, such as Putty. Just in case.
Before you do anything, make sure you have both the latest 'VirtualBox' AND
'VirtualBox Extension Pack' installed.
Download and install Vagrant. While installing, make sure to choose the
option to add Vagrant to your Windows PATH variable.
Create an empty project directory, such as at C:/Projects/R/, and navigate
to it.
Right-click inside the folder to bring up the standard system dialogue, and
select Open command window here. A command line should pop up.
Type vagrant init http://static.datasciencetoolkit.org/dstk_0.50.box. You
should see this success message:
A 'Vagrantfile' has been placed in this directory. You are now ready to
'vagrant up' your first virtual environment! Please read... [and so on].
Confirm that a Vagrantfile has indeed been created in your project
directory, which I assume to be at C:/Projects/R/.
If you receive a fail message at this step about not recognizing the command
called vagrant, then something may be wrong with your PATH variable.
Edit that Vagrantfile with a basic text editor and completely replace with this:
Vagrant.configure(2) do |config|
config.vm.box = "http://static.datasciencetoolkit.org/dstk_0.50.box"
config.vm.network "forwarded_port", guest:80, host:8080
# config.ssh.username = 'vagrant'
# config.ssh.password = 'nova'
config.ssh.insert_key = true # important: touch if you understand.
config.vm.provider "virtualbox" do |v|
v.gui = false # optionally brings up VirtualBox visual interface
v.name = "vbox_vagrant" # name that VirtualBox will use for your virtual machine
v.memory = 2048 # megabytes ram
v.cpus = 2 # cores
end
end
Type vagrant up, which will start downloading an image. Your image could
take a few hours. This command will only be slow the first time. After the
initial download, your virtual machine will then launch via VirtualBox, but
the VirtualBox visual interface won't launch because we set the option above.
Time to check if it works. In the command console, which should still be
pointed to the correct project directory, type in vagrant ssh. You should
now have command-line access to your virtual machine. Success! If you're
saying there's a server in there, then try going to your browser, visit
and the URL localhost:8080. I'm speculating about your situation so it may
not work.
To stop the virtual machine, do vagrant halt. To delete it, type vagrant
destroy. To check the status, type vagrant status. People create and
destroy virtual machines all the time, because once you download the 'box',
these steps become very fast.
I haven't checked if the image you downloaded already as R installed, but I
presume so. If not, then you need to do it on the virtual machine.
Related
I accidentally deleted my public and private key and had to generate new SSH keys due to not being able to restore the keys (and not having a backup anywhere). How do I change the public SSH key then of my Oracle Cloud instance?
Terminating the instance and remaking it isn't an option, and I've tried looking online but wasn't able to find much. Any help would be appreciated.
Thanks
Some background
Found a solution! Just so people are aware, there are methods online that involve connecting to the machine via VNC, but for me personally it felt very trial-an-error, when pressing buttons at the wrong time, and it ended up not working properly (VNC didn't display recovery mode for me, just a blank screen after selecting it).
Summary
This guide involves: Creating another machine (as incl. in free tier anyway), detaching the boot volume drive from the machine and attaching it to the machine just created, to do editing to change the keys over, then attaching the drive back up.
Create another VPS (Oracle have them incl. > free tier)
I deleted one of my other VPS' in the Oracle panel (that was a free machine - as I didn't need it and wasn't using it) and created it again anew (I made sure to delete the old boot volumes before continuing).
(This solution is assuming your using Ubuntu 20.04, but this will probably work for other OS's as well)
Basically from there,
I powered off the machine I wanted to change my SSH key of.
After fully being powered off, just detach the boot volume from the VPS, and attached it as a block volume to the machine just created.
Login to the machine via SSH, and run the connection commands by hitting the three dots (image below) and viewing the connection commands, to connect the drive up.
Editing files on the drive & mounting process
Then by running blkid (or sudo fdisk -l for a more friendly view)
you're able to see what drives are available for mounting. So then you just make a folder and simply type:
sudo mount [drive path e.g. /dev/sdb] [folder path e.g. ./drive]
Edit the file at /home/ubuntu/.ssh/authorized_keys, or however your machine is configured (Oracle by default disallows root, but if you've edited your configuration it's up to your end).
Then, simply go to the relevant path to be able to unmount the drive, umount [folder path e.g. ./drive]
Run the disconnect commands for the drive from the panel.
Then, simply detach the drive from your other machine and reattach it back to the original machine. Wait till it's fully attached and then start the machine again.
You can create a console connection, connection to it, then reboot the instance (through OCI console), and get to GRUB in the console connection... a few more steps and you can upload a new ssh key: https://docs.oracle.com/en-us/iaas/Content/Compute/References/serialconsole.htm
I'm currently trying to develop a cloud in my pc using virtual box. The idea is that I have 2 virtual machines, one which devstack installed (all in one) and the other with osm mano. Right now both have everything installed. Hence, I can log in to mano via user and password 'admin' as well as to devstack.
Current properties:
VM1 (devstack): IP (enp0s8) -> 192.168.56.101
Login to 192.168.56.101 -> correct
VM2 (mano): IP (enp0s8) -> 192.168.56.105
Login to 192.168.56.105 -> correct
As some of you may guess, I have 2 network interfaces in every vm, the first one being NAT (enp0s3 with 10.0.2.15 IP) and the second one being Host Only (192.168.56.x according to virtual box).
Needless to say, I can ping from one virtual machine to another without any problem.
Now, in the past I've being using devstack (ubuntu 18.04) in order to play with it a little bit, learn how to deploy instances, create groups and so on. Indeed, I developed a topology with an instance as a router and nagios as the monitoring tool system. It worked and I learnt a lot!
Anyway, what I want in this case is starting from scratch (scratch meaning having downloaded mano and devstack but without going further). So here I am, trying to integrate OSM with Devstack, making use of osm-vim command as it is:
osm vim-create --name openstack-site --user admin --password my_openstack_password --auth_url http://192.168.56.101:5000/v3 --tenant admin --account_type openstack
In this case, my openrc file (downloaded from horizon) resulted in my auth_url being:
export OS_AUTH_URL=http://192.168.56.101:5000/v3
What I'm trying to get my head into is how it's possible that this doesn't work, as whenever I log-in to mano web interface (after osm-vim command) I go to VIM accounts and operational state equals to "error".
Any kind of help would be much appreciated, as I've being struggling for a week now.
Thanks in advance!
I had the same problem. At the beginning I thought It was a network problem, but finally I found out It was due to a SSL problem. The most easy solution is to put a specific flag to avoid the SSL verification until the developers fix it. "--config '{insecure: True}'"
I also encountered this problem when I finished installing OSM-10 and OpenStack-Ussuri for Ubuntu18.04 some days ago. I solved this problem by change the url "--auth_url http//:192.168.23.18:5000/v3" to "-- auth_url http//:controller:5000/v3" and put "192.168.23.18 controller" in the ro container "/etc/hosts". The "controller" here is the host name where you install your openstack and which is used is your keystone authentication urls. Maybe you also have solved this problem but this problem is so troublesome and I hope more people do not be annoyed at this~
I have an Access DB app that exports a table (to XLS) then FTPs to our FTP server over our VPN. This routine has been working for several years, until ~yesterday. I am not sure what could have changed to break this function.
This is not really an Access DB issue as I see the same "Closed Connection" when manually attempting to FTP PUT at the Windows command line. Other users of the Access app (VPN and local) are not seeing this same issue.
I did receive a Win10 Security update this week - possible this affected my firewall settings?
Any suggestions where to begin? Googling suggests to portforward Port 20/21, but this seems to have no effect either.
Thank You!
Note 1: I do use WinSCP for passive transfers for another specific task to FTP to a 3rd party who requires passive transfers. Some of our users in India are unable to use this tool reliably, so I am hesitant to convert this basic function in my Access app as it works everywhere but my local machine.
Note 2: I attempted to add "QUOTE PASV" before a command line transfer with no effect. As I am reading, Windows FTP utility does not support Passive transfers
Note 3: FileZilla can see and transfer to the FTP server using "Plain FTP" mode. Interesting, but I really need this to work via command line without requiring a 3rd part app installation.
Note 4: I uninstalled the Win10 Security Update - No effect
I'm developing a website on my local machine using myblog.local as a custom domain for that, I have an apache VirtualHost and the name registered on the hosts file of my mac. The thing is when I try to use chrome remote debugging on my USB connected device using myblog.local as an address pushed using the chrome://inspect tool.
I always a not found error.
My question is, do I need to do something extra in order to remotely debug a custom domain registered on my Mac?
Check out Map to custom local domains.
I got it set up once to work with custom local domains, but it took a bit of experimenting. I definitely needed a proxy server to get it working.
I had exactly the same problem on a PC. I followed #Kayce Basques' Map to custom local domains guide and after some perseverance everything is now working.
Kayce's guide requires a proxy server, I've included my working configuration for the Squid open source and free proxy server below.
Squid installation was easy, I just downloaded and installed a pre-compiled Windows binary file and the server appeared in my Windows system tray. It should hopefully be equally simple for OSX and Linux platforms.
All configuration is done inside a squid.conf file accessible from the Squid menu. I followed this simple guide for a Reverse Proxy. Whilst I included everything in that guide I believe the following line is the critical one to get everything working.
cache_peer 192.168.0.2 parent 80 0 no-query proxy-only originserver
In the above line 192.168.0.2 is my PC's internal IP address and 80 is my Apache virtual host port number defined in my Apache Virtual Hosts file. There's another helpful guide here but that guide omits the originserver option and didn't work on my machine though otherwise helpful.
It seems you do need to be connected by USB cable for this to work so I don't quite understand #asolenzal's comment above. Also each time I changed the configuration I ran Path/to/squid.exe -k reconfigure -n Squid in a command window to reload Squid. You can find that command here.
Lots of conflicting reports out there when I google; can anyone help?
Basically I want to have the same databases available at work & home PCs, for development porpoises only.
I will only ever be physically at one PC (with a 45 minute trip between) and only then will there be database access. The MySql service will be running on both, but only one will be write/reading the database. Both run Windows 7
I don't need to bother with symlinks, junctions, etc as I have enough space in my DropBox to install all of Xampp there.
Can I do that without corruption?
I use something similar as part of my remote development testing, I have never tried to run a large set of data from this or a production database. Haha, but for testing queries and setting up a couple rows, etc... I use something very similar with little to no problems.
I believe that you can run the portable xampp and mysql from your Dropbox just go to www.portableapps.com to get the xampp and also download the portable launcher from the link on the page.
Let XAMPP server run on your computers, and the data folder saved on your cloud (DropBox, SkyDrive, etc).
You should install XAMPP portable on your root folder (c:) that is the same on all computer you use, then you can move XAMPP data folder (xampp Apache htdocs) and MySQL data (xampp Mysql/data) folder to Dropbox.
Do not use XAMPP installer, but use the portable one.
Configure the folder settings on both Apache and MySQL config file:
C:\xampp\apache\conf\httpd.conf
C:\xampp\apache\conf\extra\httpd-ssl.conf
C:\xampp\apache\conf\extra\httpd-xampp.conf
C:\xampp\mysql\bin\my.ini
Do the same with other server that you use (PostgreSQL, etc).
Make sure that you:
Always turn off XAMPP server after using on each PC.
Always sync Dropbox before changing PC, that is before logging on and after logging off on different computer.
Mind host / local domain variable on each computer.
Its probably better to use same username for all computer you want to use to run the data folder.
Other method is using PortableAppas.com, that is running the apps directly from USB.