I'm using Drush over Pantheons terminus command-line tool, and trying to update my dev environment.
This command works just fine:
terminus drush [sitename].dev "pm-update"
However, I can't seem to pass the --security-only tag to drush in a way that will work. I've tried numerous variations, including
terminus drush [sitename].dev "pm-update --security-only"
terminus drush [sitename].dev "pm-update" --security only
Etc. Has anyone gotten this working?
Terminus is best used just to generate drush aliases, I think. Once it generates the aliases, just use garden-variety drush with those aliases. When you're logged into terminus, use this command:
terminus aliases
then you can run commands you like, if you add the --strict=0 tag:
drush #[sitename].dev pm-update --security-only --strict=0
Related
I would like to install, configure, deploy and serve a local react application using Ansible but i cannot get any valuable information to do it.
Is there anybody who can guide me on how to achieve this?
Thanks in advance.
First off, ansible has a REALLY extensive wiki here. That will show you the many modules that can be used to do specific tasks. However, this is not where I would start for writing your first playbook, it gets rather daunting.
However, I started and would recommend you start on this tutorial on how to make your first playbook. you would make a yaml file and run it using the 'ansible-playbook' command on a host that has ssh enabled, ansible installed, and a key pair setup (easily done with ssh-copy-id user#hostname). If you need a way to quickly provision these machines, I personally use Hashicorp's Vagrant to quickly make simple Virtual Machines, however it is possible to use Docker or something else.
As for the specifics for installing specific applications using apt; use the apt module in ansible should serve you right. If you need to install NPM or something of the sort, chances are there's a module for that too. As for copying configs you would want the copy module. Things are pretty straight forward. a good way to structure the google searches to find specific modules would be something like "ansible copy files" and find something from docs.ansible
I realize that this is rather vague; however, I'm not completely sure on your use case in this scenario simply because of the broadness of the question.
Thanks a lot for your input, it was very helpful.
I finally achieved what i was looking for, and for reference here's how i made it. Hope this is useful for other users.
Assuming you have already installed Ansible in your machine, the following should do the job.
vim inventory
[appserver]
127.0.0.1 ansible_connection=local
vim playbook.yml
---
- hosts: appserver
tasks:
- name: Installing nodejs
apt: name=nodejs update_cache=yes
- name: Installing npm
apt: name=npm update_cache=yes
- name: Installing dependencies
command: npm install
- name: Building
command: npm run build
- name: Installing web server
command: npm install serve
- name: Running app on http://localhost:8080
command: chdir=./build serve -p 8080
To run it, just place the following in your CLI
sudo ansible-playbook -i inventory playbook.yml
I am using custom Nagios plugins for the first time and am running into this error when I create a service for the plugin.
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load.py, ...) failed. errno is 2: No such file or directory
The plugin works when I run it on the command line, however does not work when it runs within Nagios.
I followed these steps to get the plugin into Nagios
https://assets.nagios.com/downloads/nagiosxi/docs/Managing-Plugins-in-Nagios-XI.pdf
Here is what it looks like in the Nagios UI
The plugin is in the correct path: /usr/local/nagios/libexec and the resource.cfg file has the same path within it.
I tried two separate plugins, both which work on the command line, and the result is the same error.
The error indicates the file location is incorrect, however the plugin is in the specified directory and runs with no errors within that directory.
I am totally stumped and appreciate any help.
For anyone reading this, I solved the problem.
The first time I added the plugin, I forgot to add the python extension. When I updated the already created plugin, Nagios still threw the error.
Once I completely deleted the plugin and re-created it the 'file not found', error went away.
I faced a similar issue when I was trying to add a custom plugin ( I had custom plugins in ruby and python ).
The issue was the missing shebang line at the start of the script (which determines the script's ability to be executed like a standalone executable).
For example, if you have a python plugin custom-plugin.py then make sure this script has shebang at the start of script #!/usr/bin/env python3. Also if you have other scripts (ruby, bash etc.) make sure to add the appropriate path at the start of your scripts.
Also, check the path for plugins Nagios version. For my setup path was /usr/local/nagios/libexec/ and make sure your custom plugin is executable and has correct ownership permissions.
Sample custom template I used :
define command {
command_name check_switch_health
command_line /usr/local/nagios/libexec/check_snmp.rb --host $HOSTADDRESS$ --model "$ARG1$" --community "$ARG2$"
}
The above workaround worked for me.
I have installed Composer on C drive (C:\Documents and Settings\All Users\Application Data). I have a drupal7 project on D drive (D:\wamp\www\drupal71).
I have installed Drush by this command: composer global require drush/drush:7.* and it successfully downloaded but skipped installing because of naming conflicts. Please see the attached screen shot.
Now when I run the drush command drush status, it shows that "drush is not recognized as an internal or external command".
Can you please guide / help me?
You have to add the PATH to your environment variables. To do this:
Right-click My computer, and go to "Properties"
Go to Advanced System Settings
In the Avanced tab, click Environment Variables
At user variables for User, you should add a line to the "Path" variable ( if you don't have that already create it)
You should add the absolute path where your drush file is DON'T FORGET TO PUT ";" before the other paths which may be already there.
My drush file absolute path was E:/windrush/vendor/drush/drush so I added like the following picture
Is it possible to use the command line tool in PHPstorm to run Drush on a Vagrant box?
If so how do I go about this?
Command Line Tool plugin -- no and there is no current plans for that.
https://youtrack.jetbrains.com/issue/WI-23740 -- watch this ticket (star/vote/comment) to get notified on decision/progress.
But you can use built-in Remote Terminal (over SSH) for that: https://confluence.jetbrains.com/display/PhpStorm/Using+the+PhpStorm+built-in+SSH+terminal+and+remote+SSH+external+tools
From the IAR command line, it's easy to build a particular configuration, and obviously, if I want to mimic the "build all" behavior I just run my own batch file with the configs I want.
How do I handle the case where I want to build all configs, but I don't know in advance what configurations are available?
Using Jenkins, for instance, if a developer adds a configuration in the IAR IDE, it won't be included in a build until the Jenkins scripts are manually updated. I just want Jenkins to build all the configurations without caring what they are called. In the IAR GUI for setting up batches, there is an option to rebuild all so there must be something somewhere. Thanks!
You can specify * as configuration name to build everything, like this:
c:\> iarbuild myproject.ewp -build *
One solution I've implemented years ago for this problem was to read the configuration names from the .ewp file and use them for the build.
Regards
Yves