mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
Merge branch 'master' of github.com:verdaccio/verdaccio
This commit is contained in:
commit
2abd6c70a7
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
id: authentification
|
id: authentification
|
||||||
title: "Authentification"
|
title: "Autenticación"
|
||||||
---
|
---
|
||||||
The authentification is tied to the auth [plugin](plugins.md) you are using. The package restrictions also is handled by the [Package Access](packages.md).
|
La autenticación esta atada al [plugin](plugins.md) de autenticación que estes usando. Las restricciones de paquetes es manejado por el [maneador de acceso de paquetes](packages.md).
|
||||||
|
|
||||||
The client authentification is handled by `npm` client itself. Once you login to the application:
|
El cliente de autenticación es manejado por el cliente `npm` en su mismo. Una vez has iniciado sesión en la aplicación:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm adduser --registry http://localhost:4873
|
npm adduser --registry http://localhost:4873
|
||||||
```
|
```
|
||||||
|
|
||||||
A token is generated in the `npm` configuration file hosted in your user home folder. For more information about `.npmrc` read the [official documentation](https://docs.npmjs.com/files/npmrc).
|
Un toquen es generado en el archivo de configuración de `npm` alojado en el folder de usuario de tu máquina. Para mas información sobre `.npmrc`lea [la documentación oficial](https://docs.npmjs.com/files/npmrc).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat .npmrc
|
cat .npmrc
|
||||||
@ -19,11 +19,11 @@ registry=http://localhost:5555/
|
|||||||
//registry.npmjs.org/:_authToken=secretNpmjsToken
|
//registry.npmjs.org/:_authToken=secretNpmjsToken
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Anonymous publish
|
#### Publicar anonimamente
|
||||||
|
|
||||||
`verdaccio`allows you to enable anonymous publish, to achieve that you will need to set up correctly your [packages acces](packages.md).
|
`verdaccio` te permite habilitar publicar de manera anónima, para conseguirlo necesitarás configurar correctamente el [acceso de paquetes](packages.md).
|
||||||
|
|
||||||
Eg:
|
Por ejemplo:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
'my-company-*':
|
'my-company-*':
|
||||||
@ -32,11 +32,11 @@ Eg:
|
|||||||
proxy: npmjs
|
proxy: npmjs
|
||||||
```
|
```
|
||||||
|
|
||||||
As is described [on issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) until `npm@5.3.0` and all minor releases **won't allow you publish without a token**. However `yarn` has not such limitation.
|
Como se describe en [el ticket #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) hasta la versión de `pm@5.3.0` y todas las versiones menores **no permitirán publicar sin un token**. Sin embargo, `yarn` no tiene esa limitación.
|
||||||
|
|
||||||
## Default htpasswd
|
## Htpasswd por defecto
|
||||||
|
|
||||||
In order to simplify the setup, `verdaccio` use a build-in plugin based on `htpasswd`.
|
Con el fin de simplificar la instalación, `verdaccio` usa una extensión por defecto basada en ` htpasswd`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
auth:
|
auth:
|
||||||
@ -47,9 +47,9 @@ auth:
|
|||||||
#max_users: 1000
|
#max_users: 1000
|
||||||
```
|
```
|
||||||
|
|
||||||
| Property | Type | Required | Example | Support | Description |
|
| Propiedad | Tipo | Requerido | Ejemplo | Soporte | Descripción |
|
||||||
| --------- | ------ | -------- | ---------- | ------- | ---------------------------------------- |
|
| --------- | ------ | --------- | ---------- | ------- | ---------------------------------------------- |
|
||||||
| file | string | Yes | ./htpasswd | all | file that host the encrypted credentials |
|
| file | string | Si | ./htpasswd | all | archivo que aloja las credenciales encriptadas |
|
||||||
| max_users | number | No | 1000 | all | set limit of users |
|
| max_users | number | No | 1000 | all | limita los usuarios que pueden registrarse |
|
||||||
|
|
||||||
In case to decide do not allow user to login, you can set `max_users: -1`.
|
En caso que decidas no permiter mas nuevos registros, puedes definir `max_users: -1`.
|
@ -1,24 +1,24 @@
|
|||||||
---
|
---
|
||||||
id: cli
|
id: cli
|
||||||
title: "Command Line Tool"
|
title: "Herramienta de Linea de Comando"
|
||||||
---
|
---
|
||||||
The verdaccio CLI is your go start the application.
|
El CLI de verdaccio es la forma de iniciar la aplicación.
|
||||||
|
|
||||||
## Commands
|
## Comandos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ verdaccio --listen 4000 --config ~./config.yaml
|
$ verdaccio --listen 4000 --config ~./config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
| Command | Default | Example | Description |
|
| Comando | Por Defecto | Ejemplo | Descripción |
|
||||||
| ------------------ | ------------------------------ | -------------- | ---------------------- |
|
| ------------------ | ------------------------------ | -------------- | --------------------------- |
|
||||||
| --listen \ **-l** | 4873 | -p 7000 | http port |
|
| --listen \ **-l** | 4873 | -p 7000 | puerto http |
|
||||||
| --config \ **-c** | ~/.local/verdaccio/config.yaml | ~./config.yaml | the configuration file |
|
| --config \ **-c** | ~/.local/verdaccio/config.yaml | ~./config.yaml | el archivo de configuración |
|
||||||
|
|
||||||
## Default config file location
|
## Ubicación por defecto del archivo de configuración
|
||||||
|
|
||||||
To locate the home directory, we rely on **$XDG_DATA_HOME** as a first choice and Windows environment we look for [APPDATA environment variable](https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/).
|
Para localizar el directorio de inicio, verdaccio confia en **$XDG_DATA_HOME** como primera opción y en un ambiente Windows se usa [la variable de ambiente APPDATA](https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/).
|
||||||
|
|
||||||
## Default storage location
|
## Ubicación del almacenamiento
|
||||||
|
|
||||||
We use **$XDG_DATA_HOME** environment variable as default to locate the storage by default which [should be the same](https://askubuntu.com/questions/538526/is-home-local-share-the-default-value-for-xdg-data-home-in-ubuntu-14-04) as $HOME/.local/share. If you are using a custom storage, this location is irrelevant.
|
Verdaccio usa la variable de ambiente **$XDG_DATA_HOME** por defecto para ubicar el almacenamiento por defecto, el cual [debería ser lo mismo ](https://askubuntu.com/questions/538526/is-home-local-share-the-default-value-for-xdg-data-home-in-ubuntu-14-04) que $HOME/.local/share. Si estas usando un almacenamiento personalizado, lo anterior es irrelevante.
|
@ -10,27 +10,27 @@ docker pull verdaccio/verdaccio
|
|||||||
|
|
||||||
## Versiones con Etiquetas
|
## Versiones con Etiquetas
|
||||||
|
|
||||||
Since version `v2.x` you can pull docker images by [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), as follows:
|
A partir de la versión `v2.x` puedes descargar imagenes de docker por [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), como a continuación:
|
||||||
|
|
||||||
For a major version:
|
Para usar una versión "major":
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull verdaccio/verdaccio:2
|
docker pull verdaccio/verdaccio:2
|
||||||
```
|
```
|
||||||
|
|
||||||
For a minor version:
|
Para usar una versión "minor":
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull verdaccio/verdaccio:2.1
|
docker pull verdaccio/verdaccio:2.1
|
||||||
```
|
```
|
||||||
|
|
||||||
For a specific (patch) version:
|
Para usar una versión mas específica ("patch"):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull verdaccio/verdaccio:2.1.7
|
docker pull verdaccio/verdaccio:2.1.7
|
||||||
```
|
```
|
||||||
|
|
||||||
For the next major release using the `beta` version.
|
Para usar el siguiente lanzamiento se usa el tag ` beta`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull verdaccio/verdaccio:beta
|
docker pull verdaccio/verdaccio:beta
|
||||||
@ -42,21 +42,21 @@ The Canary version (master branch) is tagged as `alpha`
|
|||||||
docker pull verdaccio/verdaccio:alpha
|
docker pull verdaccio/verdaccio:alpha
|
||||||
```
|
```
|
||||||
|
|
||||||
> If you are interested on a list of tags, [please visit the Docker Hub website](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
> Si estas interesado en un listado de todos tags, [por favor visite el sitio web de Docker Hub](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
||||||
|
|
||||||
## Ejecutando verdaccio usando Docker
|
## Ejecutando verdaccio usando Docker
|
||||||
|
|
||||||
To run the docker container:
|
Para ejecutar el contenedor de docker:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
The last argument defines which image to use. The above line will pull the latest prebuilt image from dockerhub, if you haven't done that already.
|
El último argumento define cual imagen se usa. En la linea de abajo se descargará la ultima imagen desde Docker Hub, si ya no existía previamente.
|
||||||
|
|
||||||
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
|
Si ya has [construido tu imagen](#build-your-own-docker-image) usa `verdaccio` como último argumento.
|
||||||
|
|
||||||
You can use `-v` to mount `conf` and `storage` to the hosts filesystem:
|
Puedes usar `-v` para montar `conf` y `storage` desde tu sistema de archivos:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||||
@ -65,11 +65,11 @@ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
|||||||
verdaccio/verdaccio
|
verdaccio/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker and custom port configuration
|
### Usar un puerto personalizado con Docker
|
||||||
|
|
||||||
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
|
Cualquier `host:port` configurado en `conf/config.yaml` bajo el parametro `listen` es ignorado usando Docker.
|
||||||
|
|
||||||
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
|
Si deseas alcanzar la instancia de docker con un diferente puerto, digamos `5000`. En el comando `docker run` reemplace `-p 4873:4873` por `-p 5000:4873`.
|
||||||
|
|
||||||
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
|
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ PORT=5000; docker run -it --rm --name verdaccio \
|
|||||||
verdaccio/verdaccio
|
verdaccio/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using HTTPS with Docker
|
### Configura Docker con HTTPS
|
||||||
|
|
||||||
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
|
Puedes configurar el protocolo que verdaccio, de manera similar la configuración del puerto. Puedes sobre escribir el vapor por defecto ("http") de la variable de entorno `PROTOCOL` a "https", después puedes especificar el certificado en config.yaml.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||||
@ -91,18 +91,18 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||||||
verdaccio/verdaccio
|
verdaccio/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using docker-compose
|
### Usando docker-compose
|
||||||
|
|
||||||
1. Get the latest version of [docker-compose](https://github.com/docker/compose).
|
1. Obtener la última versión de [docker-compose](https://github.com/docker/compose).
|
||||||
2. Build and run the container:
|
2. Construye y ejecuta el contenedor:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose up --build
|
$ docker-compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
|
Puedes usar el puerto a usar (para el contenedor y el cliente) prefijando el comando `PORT=5000`.
|
||||||
|
|
||||||
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
|
Docker generará un volumen en cual persistirá los datos de almacenamiento de la aplicación. Puedes usar `docker inspect` o `docker volume inspect` para revelar el contenido físico del volumen y editar la configuración tal como:
|
||||||
|
|
||||||
$ docker volume inspect verdaccio_verdaccio
|
$ docker volume inspect verdaccio_verdaccio
|
||||||
[
|
[
|
||||||
@ -117,35 +117,35 @@ Docker will generate a named volume in which to store persistent application dat
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Build your own Docker image
|
## Construye tu propia imagen de Docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t verdaccio .
|
docker build -t verdaccio .
|
||||||
```
|
```
|
||||||
|
|
||||||
There is also an npm script for building the docker image, so you can also do:
|
Dentro del proyecto existe un script the npm para simplificar la creación de la imagen de Docker:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build:docker
|
npm run build:docker
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
|
Nota: Construir la primera vez toma unos minutos porque se necesita ejecutar `npm install` y tomará mas tiempo cada vez que cambies cualquier archivo que no este listado en `. dockerignore`.
|
||||||
|
|
||||||
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
|
Si quieres usar la imagen de docker en un rpi o dispositivo compatible existe también un dockerfile disponible:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build:docker:rpi
|
npm run build:docker:rpi
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
|
Por favor, note que para cualquiera de los comandos arriba mencionados necesitas docker instalado en tu máquina y el comando docker debe estar disponible en tu `$PATH`.
|
||||||
|
|
||||||
## Docker Examples
|
## Ejemplos con Docker
|
||||||
|
|
||||||
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
|
Existe disponible un repositorio que aloja múltiples configuraciones para componer imágenes de Docker con `verdaccio`, por ejemplo, un "reverse proxy":
|
||||||
|
|
||||||
https://github.com/verdaccio/docker-examples
|
https://github.com/verdaccio/docker-examples
|
||||||
|
|
||||||
## Docker Custom Builds
|
## Imágenes de Docker Personalizadas
|
||||||
|
|
||||||
* [docker-verdaccio-gitlab](https://github.com/snics/docker-verdaccio-gitlab)
|
* [docker-verdaccio-gitlab](https://github.com/snics/docker-verdaccio-gitlab)
|
||||||
* [docker-verdaccio](https://github.com/deployable/docker-verdaccio)
|
* [docker-verdaccio](https://github.com/deployable/docker-verdaccio)
|
||||||
@ -156,4 +156,4 @@ https://github.com/verdaccio/docker-examples
|
|||||||
* [docker-verdaccio](https://github.com/Global-Solutions/docker-verdaccio)
|
* [docker-verdaccio](https://github.com/Global-Solutions/docker-verdaccio)
|
||||||
* [verdaccio-docker](https://github.com/idahobean/verdaccio-docker)
|
* [verdaccio-docker](https://github.com/idahobean/verdaccio-docker)
|
||||||
* [verdaccio-server](https://github.com/andru255/verdaccio-server)
|
* [verdaccio-server](https://github.com/andru255/verdaccio-server)
|
||||||
* [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) docker image providing verdaccio from coldrye-debian-nodejs.
|
* [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) imagen de docker que ejecuta verdaccio desde coldrye-debian-nodejs.
|
@ -2,59 +2,59 @@
|
|||||||
id: kubernetes
|
id: kubernetes
|
||||||
title: "Kubernetes"
|
title: "Kubernetes"
|
||||||
---
|
---
|
||||||
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the [verdaccio/docker-example](https://github.com/verdaccio/docker-examples/tree/master/kubernetes-example) repository. However, the recommended method to install Verdaccio on a Kubernetes cluster is to use [Helm](https://helm.sh). Helm is a [Kubernetes](https://kubernetes.io) package manager which bring multiple advantages.
|
Puedes encontrar las instrucciones para desplegar Verdaccio en un cluster de Kubernetes en el repositorio [verdaccio/docker-example](https://github.com/verdaccio/docker-examples/tree/master/kubernetes-example). Sin embargo, el método recomendado de instalar Verdaccio en un cluster de Kubernetes es usando [Helm](https://helm.sh). Helm is a [Kubernetes](https://kubernetes.io) es un administrador de paquetes que trae muchos beneficios y ventajas.
|
||||||
|
|
||||||
## Helm
|
## Helm
|
||||||
|
|
||||||
### Setup Helm
|
### Configurar Helm
|
||||||
|
|
||||||
If you haven't used Helm before, you need to setup the Helm controller called Tiller:
|
Si no has usado Helm anteriormente, necesitarás configurar el controlador de Helm llamado Tiller:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm init
|
helm init
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install
|
### Instalación
|
||||||
|
|
||||||
Deploy the Helm [stable/verdaccio](https://github.com/kubernetes/charts/tree/master/stable/verdaccio) chart. In this example we use `npm` as release name:
|
Desplegar Helm [stable/verdaccio](https://github.com/kubernetes/charts/tree/master/stable/verdaccio) chart. En este ejemplo usamos `npm` como nombre de lanzamiento:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install --name npm stable/verdaccio
|
helm install --name npm stable/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy a specific version
|
### Desplegar una versión específica
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install --name npm --set image.tag=2.6.5 stable/verdaccio
|
helm install --name npm --set image.tag=2.6.5 stable/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Upgrading Verdaccio
|
### Actualizando Verdaccio
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm upgrade npm stable/verdaccio
|
helm upgrade npm stable/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uninstalling
|
### Desinstalar
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm del --purge npm
|
helm del --purge npm
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** this command delete all the resources, including packages that you may have previously published to the registry.
|
**Nota**: el comando borra todos los recursos, incluyendo los paquetes que tu podrías haber publicado anteriormente al registro.
|
||||||
|
|
||||||
### Custom Verdaccio configuration
|
### Configuración personalizada de Verdaccio
|
||||||
|
|
||||||
You can customize the Verdaccio configuration using a Kubernetes *configMap*.
|
Puedes personalizar la configuracion de verdaccio usando un * configMap* de Kubernetes.
|
||||||
|
|
||||||
#### Prepare
|
#### Preparando
|
||||||
|
|
||||||
Copy the [existing configuration](https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml) and adapt it for your use case:
|
Copie la [configuración existente ](https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml) y adáptelo para su propio caso de uso:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml -O config.yaml
|
wget https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml -O config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Make sure you are using the right path for the storage that is used for persistency:
|
**Nota:** Asegúrese que usa la dirección correcta para el almacenamiento que es usado por la persistencia:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
storage: /verdaccio/storage/data
|
storage: /verdaccio/storage/data
|
||||||
@ -63,24 +63,24 @@ auth:
|
|||||||
file: /verdaccio/storage/htpasswd
|
file: /verdaccio/storage/htpasswd
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Deploy the configMap
|
#### Desplegar el configMap
|
||||||
|
|
||||||
Deploy the `configMap` to the cluster
|
Desplegar el ` configMap` en el cluster
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create configmap verdaccio-config --from-file ./config.yaml
|
kubectl create configmap verdaccio-config --from-file ./config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Deploy Verdaccio
|
#### Desplegar Verdaccio
|
||||||
|
|
||||||
Now you can deploy the Verdaccio Helm chart and specify which configuration to use:
|
Ahora puedes desplegar Verdaccio Helm chart y especificar cual configuración usar:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install --name npm --set customConfigMap=verdaccio-config stable/verdaccio
|
helm install --name npm --set customConfigMap=verdaccio-config stable/verdaccio
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rancher Support
|
## Soporte Rancher
|
||||||
|
|
||||||
[Rancher](http://rancher.com/) is a complete container management platform that makes managing and using containers in production really easy.
|
[Rancher](http://rancher.com/) es una completa plataforma para la administración de contenedores en producción muy fácil de usar.
|
||||||
|
|
||||||
* [verdaccio-rancher](https://github.com/lgaticaq/verdaccio-rancher)
|
* [verdaccio-rancher](https://github.com/lgaticaq/verdaccio-rancher)
|
@ -2,11 +2,11 @@
|
|||||||
id: node-api
|
id: node-api
|
||||||
title: "Node API"
|
title: "Node API"
|
||||||
---
|
---
|
||||||
Verdaccio can be invoqued programmatically. The node API was introduced after version `verdaccio@3.0.0-alpha.10`.
|
Verdaccio puede ser invocado programáticamente. El API de node ha sido introducido despues de la versión `verdaccio@3.0.0-alpha.10`.
|
||||||
|
|
||||||
## Usage
|
## Uso
|
||||||
|
|
||||||
#### Programmatically
|
#### Programáticamente
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import startServer from 'verdaccio';
|
import startServer from 'verdaccio';
|
||||||
@ -19,7 +19,7 @@ Verdaccio can be invoqued programmatically. The node API was introduced after ve
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Other implementations
|
## Otras implementaciones
|
||||||
|
|
||||||
* [verdaccio-server](https://github.com/boringame/verdaccio-server) local npm registry proxy server
|
* [verdaccio-server](https://github.com/boringame/verdaccio-server) local npm registry proxy server
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
id: packages
|
id: packages
|
||||||
title: "Package Access"
|
title: "Acceso a Paquetes"
|
||||||
---
|
---
|
||||||
It's a series of contrains that allow or restrict access to the local storage based in specific criteria.
|
Es una serie de restricciones que permiten o restringen el acceso al almacenamiento local basado en unos criterios específicos.
|
||||||
|
|
||||||
The security constraints remains on shoulders of the plugin being used, by default `verdaccio` uses the `htpasswd` plugin. If you use a different plugin the behaviour might be different. The default plugin `htpasswd` does not handles by itself `allow_access` and `allow_publish`, it's use an internal fallback in case the plugin is not ready for it. For more information about permissions visit [the authentification section in the wiki](auth.md).
|
Las restricciones de seguridad dependen de la extensión usada, por defecto `verdaccio` usa la extensión ` htpasswd`. Si usas una extensión diferente ten en cuenta que el comportamiento podría ser diferente. La extensión por defecto ` htpasswd` no majena por si mismo ` allow_access` y ` allow_publish`, en se caso existe un manejador por defecto en caso que la extensión no este listo para ello. Para mas información sobre permisos visite [la sección de autenticación](auth.md).
|
||||||
|
|
||||||
### Usage
|
### Uso
|
||||||
|
|
||||||
```yalm
|
```yalm
|
||||||
packages:
|
packages:
|
||||||
@ -29,7 +29,7 @@ packages:
|
|||||||
proxy_access: uplink2
|
proxy_access: uplink2
|
||||||
```
|
```
|
||||||
|
|
||||||
if none is specified, the default one remains
|
si ninguno es especificado, por defecto uno permanece activo
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
packages:
|
packages:
|
||||||
@ -38,20 +38,20 @@ packages:
|
|||||||
publish: $authenticated
|
publish: $authenticated
|
||||||
```
|
```
|
||||||
|
|
||||||
The list of valid groups according the default plugins are
|
La lista de grupos validos de acuerdo a la extensión por defecto son
|
||||||
|
|
||||||
```js
|
```js
|
||||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'
|
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'
|
||||||
```
|
```
|
||||||
|
|
||||||
All users recieves all those set of permissions independently of is anonymous or not plus the groups provided by the plugin, in case of `htpasswd` return the username as a group. For instance, if you are logged as `npmUser` the list of groups will be.
|
Todos los usuarios reciben una serie de permisos independientemente si es anónimo no grupos son delegados por la extensión, en caso de ` htpasswd` regresa el usuario como grupo. Por ejemplo, si inicias sesión como ` npmUser` la lista de grupos sera.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// groups without '$' are going to be deprecated eventually
|
// groups without '$' are going to be deprecated eventually
|
||||||
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous', 'npmUser'
|
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous', 'npmUser'
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to protect specific set packages under your group, you need todo something like this. Let's use a `Regex` that covers all prefixed `npmuser-` packages. We recomend use a prefix for your packages, in that way it'd be easier to protect them.
|
Si deseas proteger un grupo de paquetes específicos por un grupo, necesitarás hacer algo así. Vamos a usar un ` Regex` que cubre todos los paquetes prefijados `npmuser-`. Recomendamos user un prefijo para tus paquetes, en esa manera es mucho mas fácil protegerlos.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
packages:
|
packages:
|
||||||
@ -60,7 +60,7 @@ packages:
|
|||||||
publish: npmuser
|
publish: npmuser
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart `verdaccio` and in your console try to install `npmuser-core`.
|
Reinicia ` verdaccio` y trata de instalar el paquete`npmuser-core`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install npmuser-core
|
$ npm install npmuser-core
|
||||||
@ -72,11 +72,11 @@ npm ERR! A complete log of this run can be found in:
|
|||||||
npm ERR! /Users/user/.npm/_logs/2017-07-02T12_20_14_834Z-debug.log
|
npm ERR! /Users/user/.npm/_logs/2017-07-02T12_20_14_834Z-debug.log
|
||||||
```
|
```
|
||||||
|
|
||||||
You can change the existing behaviour using a different plugin authentication. `verdaccio` just check whether the user that try to access or publish specific package belongs to the right group.
|
Siempre puedes cambiar el comportamiento por defecto usando una diferente extensión de autenticación. ` verdaccio` verifica si el usuario trata de acceder o publicar un paquete específico pertenece al grupo correcto.
|
||||||
|
|
||||||
#### Set multiple groups
|
#### Definir múltiples grupos
|
||||||
|
|
||||||
Define multiple access groups is fairly easy, just define them with a white space between them.
|
Definir múltiples grupos es muy sencillo, solo define grupos con un espacio entre todos ellos.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
'company-*':
|
'company-*':
|
||||||
@ -90,9 +90,9 @@ Define multiple access groups is fairly easy, just define them with a white spac
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Blocking access to set of packages
|
#### Bloqueando el acceso a paquetes
|
||||||
|
|
||||||
If you want to block the acccess/publish to a specific group of packages. Just, do not define `access` and `publish`.
|
Si deseas bloquear el acceso/publicación a paquetes específicos. Solo, no definas ` access` y ` publish`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
packages:
|
packages:
|
||||||
@ -102,15 +102,15 @@ packages:
|
|||||||
publish: $authenticated
|
publish: $authenticated
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuración
|
||||||
|
|
||||||
You can define mutiple `packages` and each of them must have an unique `Regex`.
|
Puedes definir múltiples ` packages` y en cada uno de ellos debes definir un único ` Regex `.
|
||||||
|
|
||||||
| Property | Type | Required | Example | Support | Description |
|
| Propiedad | Tipo | Requerido | Ejemplo | Soporte | Descripción |
|
||||||
| --------------------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |
|
| --------------------- | ------- | --------- | -------------- | ------- | ---------------------------------------------------------- |
|
||||||
| allow_access/access | string | No | $all | all | define groups allowed to access the package |
|
| allow_access/access | string | No | $all | all | define que grupos estan permitidos para acceder al paquete |
|
||||||
| allow_publish/publish | string | No | $authenticated | all | define groups allowed to publish |
|
| allow_publish/publish | string | No | $authenticated | all | defini que grupos estan permitidos a publicar |
|
||||||
| proxy_access/proxy | string | No | npmjs | all | limit look ups for specific uplink |
|
| proxy_access/proxy | string | No | npmjs | all | limita las busquedas a un uplink específico |
|
||||||
| storage | boolean | No | [true,false] | all | TODO |
|
| storage | boolean | No | [true,false] | all | TODO |
|
||||||
|
|
||||||
We higlight recommend do not use **allow_access**/**allow_publish** and **proxy_access** anymore, those are deprecated, please use the short version of each of those (**access**/**publish**/**proxy**
|
Recomendamos no usar **allow_access**/**allow_publish** y **proxy_access** nunca mas, estan depreciados u se las versiones cortas (**access**/**publish**/**proxy**)
|
Loading…
Reference in New Issue
Block a user