You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
1.6 KiB

3 years ago
# hybrid-NodeVuejs !
3 years ago
## LabInstance Node VueJS
3 years ago
![alt text](images/swarmlab-network.png "")
## Quickstart
This is a quickstart guide of howto use this *LabInstance to deploy Vue js applications*
### HowTo use it
### Default Configuration
- Working Directory
3 years ago
> /home/docker/project
3 years ago
- Default user
> docker
- Default password
> docker
- Default password4root
> pass
#### Find lab workers
> ifconfig
>
> nmap -sP 172.130.0.0/24
>
> or
>
3 years ago
> /home/docker/project/bin/swarmlab-nmap
3 years ago
#### connect to workers
```bash
ssh docker@[IP]
```
#### Create hosts file
```bash
3 years ago
/home/docker/project/bin/swarmlab-nmap > /home/docker/project/hosts
3 years ago
```
---
**NOTE:** copy files to all clients
```bash
while read -r line;
do
3 years ago
scp /home/docker/project/file docker@$line:/some_dir/file
done < /home/docker/project/hosts
3 years ago
```
---
3 years ago
### Vue CLI Documentation
https://cli.vuejs.org/guide/creating-a-project.html#vue-create
3 years ago
3 years ago
#### Creating a Project
```bash
vue create hello-world
```
#### Run it!
```bash
npm run serve
```
3 years ago
#### Open it!
```bash
http://localhost:8080
```
3 years ago
:warning: Publishing Docker ports via -p
3 years ago
Using the -p (lower case) flag at runtime lets you publish a container’s specific port(s) to the Docker host.
```bash
3 years ago
docker exec -it -udocker -p [host-port]:[expose-port*] hybrid-nodevuejs_master_1 /bin/bash
e.g.
3 years ago
docker exec -it -udocker -p 8080:8080 hybrid-nodevuejs_master_1 /bin/bash
^^^^^^^^^^^
```
3 years ago
3 years ago
>
3 years ago
> (*) this is the port found in the container menu.
3 years ago
>
> We would expect the port number do be next to the "Ports" field.
>
3 years ago
3 years ago
3 years ago