Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
rancher-2-deploy
Advanced tools
Deployment tool for updating workloads on Rancher 2.x managed cluster with v3 API. It was developed for gitlab CD pipeline, but can be used for any other workflow. Influenced by the project rancher-gitlab-deploy.
It can be used as CLI tool, Node.js module or CI/CD pipeline tool as a docker image. It can be easily integrated into gitlab-ci.yml
or .rancher-pipeline.yml
using environment variables.
Right now it's only possible to redeploy a workload, so first you'll need to deploy your workload manually.
First you need to get an API key from your Rancher Cluster. In Rancher go to User Avatar > API & Keys > Add Key (more info).
Save the key as an environment variable in your GitLab project. On the GitLab project page go to Settings > CI / CD > Variables (more info).
RANCHER_ENDPOINT
- https://rancher.example.com/v3
RANCHER_ACCESS_KEY
- token-12345
RANCHER_SECRET_KEY
- 0123456789abcdefghijklmnopqrstuvwxyz
Deploy your project on Rancher GUI under Default project to default namespace, then put a deploy stage to your gitlab-ci.yml
:
deploy:
stage: deploy
image: registry.gitlab.com/heyj0e/rancher-2-deploy
script:
- deploy --workload <workload-name>
If you want to specify the project and/or the namespace:
deploy:
stage: deploy
image: registry.gitlab.com/heyj0e/rancher-2-deploy
script:
- deploy --project <project-name> --namespace <namespace-name> --workload <workload-name>
Install it using npm:
npm install rancher-2-deploy --save
Use:
const rancherRedeploy = require('rancher-2-deploy');
const options = {
endpoint: 'https://myserver.com/v3',
accessKey: 'token-12345',
secretKey: '0123456789abcdefghijklmnopqrstuvwxyz',
project: 'My Rancher Project', // if omitted, Default will be used
namespace: 'My Namespace', // if omitted, default will be used
workload: 'my-awesome-workload',
};
rancherRedeploy(options);
// returns Promise, then Rancher's answer
This project is licensed under the MIT License - see the LICENSE file for details
FAQs
Deploy to Rancher 2.0 via Rancher API v3
We found that rancher-2-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.