I'm trying to set up a web development environment on Amazon Workspaces running Amazon Linux AMI, but I didn't find a way to install Vagrant on the machine. I would like to have a virtual webdev machine for various practical reasons, but it seems that I can't run vagrant as AWS is already virtualised.
Is that correct, or is there a way to install and run vagrant/virtualbox containers on AWS Workspace?
AWS workspaces only offers a limited number of packages within its repo manager, so you won't find vagrant there. But you can manually install the repo using the CentOS download on their website. For example, this worked for me inside my Linux AMI WorkSpace:
wget https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.rpm
yum install vagrant_2.1.2_x86_64.rpm
Now a WorkSpace is essentially a virtualized environment, so its unlikely you will be able to run a vm inside it - See this.
However vagrant offers a number of providers other than the default - including aws, which will allow you to spin up a vagrant box on an ec2 instance rather than locally. You can install it as follows:
vagrant plugin install vagrant-aws
And follow the configuration steps here
Related
I created multiple (say 16) AWS EC2 ubuntu instances such as:
I want to keep these instances to have the same settings for later jobs. My question is how I could manage them jointly. For example, how could I install Docker in all of them at once and so that I can use docker swarm?
Ideally you would actually configure the server build before you deploy the 16 instances.
You would launch a fresh Ubuntu server and install all of the software on it with its configuration. Once all software is installed you'd create an AMI. When you go to launch the 16 servers you'd go ahead with launching them from your AMI instead of the Ubuntu image.
To follow best practices you'd not do this installation by hand, instead using a configuration automation tool such as Ansible, Chef or Puppet to configure the server to your liking.
You can make use of aws user data to install same software on all the instance during ec2 creation.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
I have AWES EC-2 instances with Ubuntu 16.04 , how to migrate them to Microsoft azure?
I have their image Amazon Machine Images (AMI) on amazon web services, is there a way I could migrate the images to azure ? or the instance configuration? I prefer copy the image I have create in amazon web services (with Ubuntu 16.04 base) to azure.
I have seen this documentation: https://learn.microsoft.com/en-us/azure/site-recovery/migrate-tutorial-aws-azure but it does not specify Ubuntu support and it copy the instance, can I copy the image? and can it be perform with ubuntu 16.04?
As you see, all the support OS version show there. So, unfortunately, it does not support Ubuntu to migrate from AWES to Azure. For Linux, it just supports a part of Red Hat and Centos versions.
For the image, it's possible to export the VM to a VHD file and upload the Azure, but it just shows the Windows VM. You can get the whole steps from Move a Windows VM from Amazon Web Services (AWS) to an Azure virtual machine. You can try for Linux, but I'm not sure about it.
If you have any more questions, please let me know. Or if you think it's OK you can accept it :-)
I suggest you strongly consider implementing the base instance configuration as a userdata or init script. This start up script would install all required software and configuration settings on the instance.
This way you can simply run the script on the Azure instance, and it will work exactly as it would on the AWS instance.
This approach is best practice for managing a baseline configuration of any instance. You can also consider configuration management tools like Ansible to do the same.
I am trying to install GUI on my Amazon Linux 2 AMI. I tried several solutions like GNNOME and Mate Desktop, but when I try to install desktop by group list I get a warning:
group Desktop does not exist or GNOME does not exist.
How can I resolve this issue?
This is now supported.
See this article in the AWS knowledge base:
How do I install a GUI on my Amazon EC2 instance running Amazon Linux 2?
Last updated: 2021-04-20
I want to install a graphical user interface (GUI) in my Amazon Elastic Compute Cloud (Amazon EC2) instance running Amazon Linux 2. How do I do this?
Short description
To install a GUI on your EC2 Linux instance, do the following:
Install the MATE desktop environment. MATE is a lightweight GUI based on GNOME 2 available as an extra for Amazon Linux 2. The Amazon Linux 2 offering of Amazon WorkSpaces uses MATE. For more information about MATE, see the MATE desktop environment website.
Install a virtual network computing (VNC) service, such as TigerVNC. For more information about TigerVNC, see the tigervnc.org website.
Connect to the GUI using the VNC.
(Optional) Install a web browser, such as Firefox or Chromium. For more information on Firefox, see the mozilla.org website. For more information on Chromium, see the chromium.org website.
Note: These instructions apply only to Amazon Linux 2. To confirm the version that you're running, run the following command:
cat /etc/os-release
I am trying to implement the CI/CD pipeline for my spring boot application deployment using Jenkins on AWS EC2 machine. And I am using containerized deployment of micro services using Docker. When I am exploring about the installation of Jenkins I found that , we can use Jenkins docker image. And also we can install normally. I found the following link for example of normal installation of Jenkins.
wget -q -O — https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
Here my confusion is that , If I am using Dockerized deployment of my micro services , Can I use normal installation of Jenkins in my VM and Can I use docker commands inside Jenkins pipeline job?
Can anyone help me to clarify the confusion please?
If you want to run docker commands in Jenkins pipelines on the same machine where Jenkins exists you should run it without container as that configuration will be much easier for you - you need to just add Jenkins to "docker" group so he can run docker containers.
When you run Jenkins from within container configuration is a little harder as probably you need to map host's docker daemon socket to Jenkins container so he can start docker containers on host or you need to use docker-in-docker feature but please take a look on that article: http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
Is it possible to install packages in a running instance without restarting the instance in gcp using rest api. I tried startupscript but it does the job only after a system restart.
You may rerun a startup-script without having to restart the VM instance by following these instructions in the GCP documentation. However, you would have to connect to the VM instance through SSH.
Regarding the REST API, there is no GCE Rest API to install packages inside the VM, however feel free to open a feature request for this on the Google issue tracker.
Package installations are done through generic Linux commands.