I have a scenario that after connecting to Remote SSH in VS Code and docker containers running is=n the host machine, I need to use Dev containers to make the developers have features that is available in VS Code GUI.
Like to create a file using simple clicks in VS Code instead of using Terminal.
My host machine is running on Amazon linux2 and the docker container has python packages, GIT and dbt core. Inside each container, every user has their own GIT cloned repo to work on that.
Tried the steps given in this URL https://code.visualstudio.com/docs/devcontainers/containers#_installation
Its quite different when I look into my VS Code console.
If anyone can provide me with the simple steps to achieve this.
Thanks in advance :)
Related
Background
I am a technical writer trying to use Read the Docs to generate documentation for one of our product. As we have a non-disclosure agreement for any publication, I have to host the documentation on a virtual machine for customers with intranet access to read.
Installation
GitLab
My VM is a CentOS 8. I installed GitLab Community Edition through Docker. I created a repository for my Markdown source code under the root account, the address of the repo being http://${vm_address}/root/${repo_name}. The GitLab container runs on Port 20 of my VM.
Read the Docs
As RTD does not officially support On-premise deployment, I pulled an unofficial image from Docker. See vassilvk/readthedocs. This RTD container runs on Port 8000 of my VM. I use username "admin" to log into RTD.
Procedure I Took to Integrate GitLab and RTD
To import the source code in my GitLab, I did the following:
On the Project page, click Import a Project.
Click Import Manually on the left panel.
In the Project Details page, fill in the fields as follows:
Project name: ${my_project_name}
Repository URL: ${Clone_With_HTTP_Address} I copied the URL from the "Clone with HTTP" field under the Clone button dropdown in GitLab
Repository Type: Git
In the Advanced Project Options, I set Documentation Type to Sphinx HTML.
Click Finish.
Result
The build fails with error code 1.
Question
Where did I do wrong with the RTD project settings?
Is something wrong going on with my RTD or GitLab container settings?
Do I still need to install Sphinx on the VM?
As we have a non-disclosure agreement for any publication, I have to host the documentation
This does not follow at all. You must be looking at the wrong ReadTheDocs. There are two sites:
ReadTheDocs.org - that one is the free, publicly visible hosting.
ReadTheDocs.com - that's the one you want, it hosts private repositories for businesses exactly like yours.
Unless you're in a well managed, secure IT environment, running random Docker images on your own VM will almost certainly lead to inadvertent disclosure. Are you in hosting business? No. Don't play a hosting business when all you want is to write some private documentation. There are products for that.
I have a node.js application I have adopted from a more senior developer. I want to deploy it, and I know it will work because he already deployed it several times. I am reading these instructions:
https://galaxy-guide.meteor.com/deploy-quickstart.html
I use windows, as did he.
How does deployment work?
Take these instructions:
Windows If you are using Windows, the commands to deploy are slightly
different. You need to set the environment variable first, then run
the deployment command second (the syntax is the same as everything
you’d put for meteor deploy).
In the case of US East, the commands would be:
$ SET DEPLOY_HOSTNAME=galaxy.meteor.com
$ meteor deploy [hostname]
--settings path-to-settings.json
Am I just supposed to go to the source directory on my laptop and run these commands? What then happens? Is the source uploaded to their server from my laptop and then their magic takes care of the rest?
What about when I want to make a change to the code? Do I just do the same thing, poiting to an existing container and, again, they do the magic?
Am I just supposed to go to the source directory on my laptop and run these commands? What then happens? Is the source uploaded to their server from my laptop and then their magic takes care of the rest?
It is not magic. You basically go to your dev root and enter these commands. Under the hood it builds your app for production (including minification and prod flags for optimization) and once complete opens a connection to the aws infrastructure and pushes the build bundle.
See: https://github.com/meteor/meteor/blob/devel/tools/meteor-services/deploy.js
On the server there will be some install and post install scripts that set up all the environment for you and, if there are no errrors in the process, start your app.
These scripts have if course some automation, depending on your account settings and the commands you have entered.
What about when I want to make a change to the code? Do I just do the same thing, poiting to an existing container and, again, they do the magic?
You will have to rebuild (using the given deploy command) again but Galaxy will take care of the rest.
I am using latest NodeJS(12.X) version in my Windows desktop.
I used remote of Cisco routers using putty and execute few commands there.
Now, I need to execute these commands (like show, run version) in my Cisco routers using Nodejs application. I need to write those output from routers in to my base machine in .txt format or need to show it in console.
I already tried simple-ssh and remote-exec but its not successful.
Can anyone help me here with sample code, that would be Great!..
Thanks.
I am working for a client that does not allow setting up anything on the native Windows workstation.
I am, however, allowed to set up a virtual machine on which I can install anything I want.
So, I've set up a Linux VM and installed the React environment.
However, I would like to be able to use the native Windows tools that are allowed for development, since installing and using them on the VM is painfully slow.
I'm currently modifying the code with a native Windows IDE, then pushing the changes to a Git repository, then pulling the changes down to the Linux VM to see them work. However, for debugging, where changes are added, removed, modified, etc... this is also painfully slow.
I tried to set up a shared folder to work on the code locally and having it update on the Linux VM dynamically, but that doesn't work because "npx create-react-app" does a bunch of things, like set up symlinks, that either don't work on a shared folder or aren't allowed by IT. I'm guessing it's the shared Windows folder that's limiting this. I also tried to set up a Samba share of the Linux folder, but I think this is blocked by IT, because I just can't see it from my Windows machine, and network discovery is turned on.
So, now that you know my pain, what would be the best way to set up a React development environment in this situation? Help...
I almost understands nothing about linux and VM, but here is something you can do.
When creating a react application with create-react-app, when you run npm start, your application will be hosted in localhost:3000.
So to do what you want, you need to set up the enviroment in the VM (e.g. create-react-app) and then configure (this is the part I don't understand how to do) your VM in a way you can access the VM's localhost and the files of your project.
This way you can edit the files of the VM and also see the app changing in the windows browser.
How to share VM's folder with host
How access VM's localhost
Essentially, I'm trying to build a web server on my home desktop.
However, I find that I am out and about quite often, so it would be nice to be able to use my laptop to edit the code on GitHub, push it to the cloned repository on my home computer, and restart the server with the changed code.
I'm building a node.js server, so all I have to do to run it is type git pull and then node app.js into the bash terminal.
I'm basically wondering if it is possible to use a different computer to execute those commands remotely.
One constraint is that although my desktop can install any software required, my laptop cannot due to a lack of administrator permissions (it's a school-issued laptop).
Also, I run windows 10 home, so enabling RDP is nearly impossible or laggy at best.
If possible, it would be nice to do the pushing to my desktop via the GitHub site. Is it possible?
It would be nice to do the pushing to my desktop via the GitHub site.
All you can do "via the GitHub site" is declared a webhook on push event.
That webhook can send a push payload on any IP you want.
If your laptop can exposes a public IP (or has a secure tunnel to localhost) with a listener (like that npm listener), it can ben notified and pull from the GItHub repo whenever there is a push.