Encountered problem while integrating devstack - osm (open source mano) - integration

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~

Related

How do you change the public key of a Oracle Cloud Instance?

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

Google Chrome remote debugging local domain

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.

downloading the datasciencetoolkit.org server to use (R, Vagrant, VirtualBox)

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.

trouble with hg serve on the lan

Our team started using mercurial about a month ago and it was a rough start, but it's working out well now. At the end of last week though, we suddenly had issues pulling from each other's repositories.
Normally, I would pull from, for example, prog12:800, and it would work great. Now, I get the message
URLError: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
The hg server is running, and it's not a firewall issue. This issue only occurs when trying to access my repo and two other people's. Accessing everyone else's, and the one on our webdev server, is fine. We are all on the same lan (though two of us connect via vpn) We all have the same issue - from my own computer, i can type in my computer name:8000 and it works, but no one else can see it.
I appreciate any suggestions!
It it possible your IT department deployed something that's acting as a firewall on each machine? Being able to connect to your own port 8000, but not others' just screams firewalls.
That said, most people don't actually run hg serve on developer boxes. Instead you let each developer freely create repos on the "central" "webdev" box. So I might create 'work-in-progress-ry4an' and do push/pull from there, and other can pull from it.
The hg serve functionality is a great way to pass someone some quick changesets, but not built to be used as an always-on server.

Comet (Ajax Push) in Godaddy dedicated server?

I want to know if it's possible and I'm looking for tutorials to set it up.
APE website says that knowledge of JavaScript programming is sufficent to follow the tutorial however I haven't been able to puzzle even the first 2 lines of the tutorial.
I'm using Ubuntu. After downloading APE I have no idea what to do. I already set up SSH to access the server.
What should be my following steps or where can I find an easier to tutorial to use comet be it through APE or something else?
Assuming your GoDaddy server is running some flavor of Linux, I don't see any reason it would not be possible. I was just looking over the documentation and I am not clear on what part you are having trouble with. What Linux distribution are you using? Do you have SSH access?
If you have ssh access and a root account you should be able to just follow the instructions to get APE running on the default port.
If you are running a Debian dist (Ubuntu and others) it looks like you should download the source from Git and compile it. There are instructions for the compilation there. You can learn about what you need to do wth Git by search for "clone git".
If you can be more specific about what you are having trouble with, we can probably be more helpful. But ultimately you should be able to install this on any dedicated server without issue.