omegaup / deploy

Deployment for omegaUp
2 stars 8 forks source link

No es posible copiar el folder opt/omegaup de Vagrant a un folder local #12

Closed carlosabcs closed 6 years ago

carlosabcs commented 6 years ago

Intenté clonar un fork del repositorio omegaup al host y así activar la sincronización de vagrant para tenerlo funcionando en la máquina virtual, pero hay una serie de configuraciones faltantes que desconozco y no están descritas en la Wiki. De igual manera, intento copiar la carpeta /opt/omegaup desde la máquina virtual de vagrant hacia mi host local usando vagrant scp, pero tampoco me es permitido.

Trato de conseguir tener el repositorio en el host local para así conseguir usar algún editor de código en el desarrollo.

heduenas commented 6 years ago

También puedes conectar tu editor vía ssh a la VM. Has intentado eso?

AtharvaKhare commented 6 years ago

If you have enough time to invest, "vim editor"(or emacs) would certainly pay off on the longer run. Make sure you update it first sudo apt-get install vim.

Alternatively, /vagrant in the ssh is already synced with the folder containing Vagrantfile on your host computer.

lhchavez commented 6 years ago

What host operating system do you use? If it's Linux, you can install any application in the VM , launch it and will see that app's window thanks to the X Forwarding of the VM. If you are using OS X, you might be able to install https://www.xquartz.org/ and achieve the same thing (although lacking a Mac, I've never tried it myself. Let @pabo99 know if you manage to get this working!)

If you're in Windows, you can try to flip this flag https://github.com/omegaup/deploy/blob/a654c47d12557bb4e7506356ec9b26af83d4fe7f/Vagrantfile#L23-L34 after carefully reading the warning. Maybe stuff has been updated and now it works. But don't hold your breath on that one :(

@CarlosCordova18 what editor are you trying to use? If it's sublime, that one has the option @heduenas mentions to connect directly using ssh/sftp. If it's another one, one of the Windows-using folks might be able to help you.

carlosabcs commented 6 years ago

I'm using VSCode on Fedora 27. As @lhchavez suggested, I managed to install VSCode on the virtual machine, but it runs slower than expected. I'll search for a way to connect my local VSCode to the virtual machine directly. Otherwise, I'll install Sublime text :smile: Thanks you all for your help!

lhchavez commented 6 years ago

oh if you are using Fedora, you can enable folder synchronization! it should just work :D

carlosabcs commented 6 years ago

The problem is that the folder synchronization of Vagrant takes my local folder and copies it to the virtual machine, not the other way around and since the local folder is initially empty, the folder /opt/omegaup/ in the virtual machine appears empty.

lhchavez commented 6 years ago

got it. you can run vagrant provision to re-create the contents of the folder.

lhchavez commented 6 years ago

I did a few changes to the deployment scripts. You should be able to run vagrant destroy, re-download the deploy repo and after you run vagrant up, there should be a local folder called omegaup/ next to Vagrantfile. This folder is synchronized with /opt/omegaup, so you won't need to jump through hoops to get your IDE working!

carlosabcs commented 6 years ago

Finally, I got it. Thank you very much!