Prerrequisitos:
Tener suscripcion en Azure
Manejo Comandos basicos
1- Crear Maquina Virtual Ubuntu
ver https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal
Ingresar por consola
ssh jimmy@104.46.115.93
2- Actualizar repositorio
sudo apt-get update
3- Instalar Docker
curl -sSL https://get.docker.com/ | sh
4- Reiniciar
sudo reeboot
5- Instalar sonar
docker pull sonarqube
Nota si sale error:
docker pull sonarqube
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.37/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.37/images/create?fromImage=sonarqube&tag=latest: dial unix /var/run/docker.sock: connect: permission denied
Se debe reiniciar
6- Ejecutar sonar
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
7- Aperturar puerto https://docs.microsoft.com/es-es/azure/virtual-machines/windows/nsg-quickstart-portal
On the virtual machine, click the name of the Resource group.
Select the network security group. The NSG can be identified using the Type column.
On the left-hand menu, under settings, click Inbound security rules.
Click on Add.
In Name, type http. Make sure Source Port range is set to *, Destination Port range is set to 9000, and Action is set to Allow.
Click OK.
En azure podemos configurar el nombre del dns
8- Resultado
http://40.79.35.159:9000/projects
No hay comentarios:
Publicar un comentario