Why can I ask for a password when using the su command problem when using GCE? - google-compute-engine

I am awkward because I am trying a translation tool, but please forgive me
As a problem su command is no longer available
I think that the same account was used as the cause and that access was done simultaneously from different terminals
Please tell me how to resolve

I had the same problem today. You need to enable oslogin by adding the necessary meta data to your Instance (likely your project as well).
Instructions below. Solved it for me. Hope it helps
https://cloud.google.com/compute/docs/instances/managing-instance-access#enable_oslogin
To set enable-oslogin in project-wide metadata so that it applies to all of the instances in your project:
Go to the Metadata page.
Click Edit.
Add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to disable the feature.
Click Save to apply the changes.
To Set enable-oslogin in metadata of an existing instance:
Go to the VM instances page.
Click the name of the instance on which you want to set the metadata value.
At the top of the instance details page, click Edit to edit the instance settings.
Under Custom metadata, add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to exclude the instance from the feature.
At the bottom of the instance details page, click Save to apply your changes to the instance.
To Set enable-oslogin in instance metadata when you create an instance:
In the GCP Console, go to the VM Instances page.
Click Create instance.
On the Create a new instance page, fill in the desired properties for your instance.
In the Metadata section, add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to exclude the instance from the feature.
Click Create to create the instance.

Related

In Foundry Workshop, is it possible to reset a scenario when a user navigates away from a Workshop tab?

I've created a scenario in Foundry Workshop, and would like to set it up so that it resets whenever a user changes their active Workshop tab. Is it possible to accomplish this within scenario variables?
If the scenario array variable is produced from a scenario object set, then changing the object set should reset it. See the relevant documentation for this at https://www.palantir.com/docs/foundry/workshop/scenarios-save/ .
If you have a single dynamic scenario that you'd like to reset, then you can use the "Reset variable" event to reset it to its default value.

node-red : load the configuration of the node once deployed

i am trying to create a new node in node-red and i am trying to make it to load the configuration once it`s added to the flow and deployed as this configuration is fixed and shared with some input and output nodes, when i check examples ( like mqtt node ) most of them wait until the use click on ADD button
So it sounds like your new node will have a config node associated with it, correct? If so, then when you drag/drop the new node into the editor, that config node will also be created (although it's not visible in the flow).
With the example you mentioned (e.g. MQTT In), the newly dropped node will show an orange triangle decorator, because the config node needs to be fully configured before it can be deployed. The reason this occurs is that the config node is invalid, due to some required fields that have no values yet.
So, when you define your .js/.html files for your new node, just make sure that all the fields on your config node are marked as required, and have default values. This should allow you to drop a new node onto the editor, and deploy the flow without having to manually edit the configuration. In fact, your new node does not even have to have a pulldown showing the config node, or allowing it to be changed -- it could just be a read-only text field.

Image synchronisation in a single Region

I would know something about fiware-glancesync component. I would like to synchronise only one image. I mean, I want to synchronise one single image in a region without modifying the current configuration file. How can I define a new configuration parameters (if it is possible) to do it with the GlanceSync?

The algorithm used to select the images can be defined by the user. The easiest
and best way to suncrhonise only one or a set of images is modifying the glancesync.conf configuration file inside ./conf directory. I recomend the creation of a new section [test] in order that you do not modify the current [master] section. Just write the following lines:
[test]
metadata_condition = image.name == 'GIS_GE'
credential= admin,<your secret>,http://130.206.112.3:5000/v2.0,admin
Keep in mind that '130.206.112.3' is the IP of the keystone service inside the FIWARE Lab, and the first and second admin are the OS_USERNAME and OS_TENANT_NAME. Last but not least 'your secret' is the password in base64 format.
And then, only execute the command:
./sync.py test:<name of the node, e.g. Lannion2>
See documentation in GlanceSync - Glance Synchronization Component in order to know more details about the image synchronization.
If you can obtain more information about the configuration of the GlanceSync, take a look to GlanceSync Configuration.

SSIS parametrize connection strings

I am trying to set up deployment process for single package usinig project deployment so VS2012. I found that to change dynamicaly connection string on the server I can parametrize connections so I did this and created enviroments and I run my package with inviroment which has connnections strings as parameters and all seems to be fine, but why on connection manager I can still see some old setup made while developing? How can I remove it ?
By Parameterize, I assume you're using the Configuration section to globally configure a project/package or on a per-execution basis. This is in contrast to using project/package Parameters
I have created an SSIS Environment variable named ConnectionStrings in my deployment folder and it has two values: ServerName and CatalogName.
I right clicked on my project, DeployMe, and selected Configure. In your screenshot, you have clicked on the specific package and selected Configure. That or you manually changed the Scope drop down.
I first click on the References and add a pointer to my Environment
Back to the Parameters tab, I click over to Connection Managers and I'm going to configure the CM_Project connection manager's ServerName property to use my environment variable's ServerName value. Clear right?
After configuring the ServerName, I also configured the InitialCatalog property but instead of using my Environment Variable's value, I used the "Edit Value" option (above) to set it. The net result is that my properties now look like this.
The underscore indicates it's set from an environment variable
The bold text indicates it's set manually.
Now when I go to run my package, via Agent or manual execution, the first thing it's going to prompt me for is an environment reference. I've lost my bolding for the InitialCatalog but the underlining remains for ServerName property. None-the-less, both are different values and were I to execute it, they would pick up the correct values.
All that said, I find it far easier to just store the whole ConnectionString value. You will observe, if you take this route, that the values displayed for ServerName would show your design-time values but that's fine because the ConnectionString as a whole will override the individual values at run-time.
I know this is a generic answer but I'm hoping I've hit on what you're missing step-wise.

How can I prevent GCE from copying ssh keys to all new instances?

When I create a new VM instance via Cloud Console, homedirs are automatically created for users that I have created manually on previous instances, and ssh-keys are copied to ~/.ssh/authorized_keys in respective homedirs.
I don't want that! This is IMHO a serious security flaw.
I don't want any users automatically created, I don't want any ssh keys automatically copied.
How can I achieve that?
You can specify the specific users & SSH keys to use for an instance by setting the instance level sshKeys metadata key. You can also do this from the command line using gcutil's --authorized_ssh_keys option:
$ gcutil addinstance --authorized_ssh_keys=username1:/path/to/keyfile1,username2:/path/to/keyfile2,...
If you want to make sure that no instances get the full set of users/keys, you can remove the sshKeys project level metadata key. From the Console, click Compute Engine, then Metadata, then click the trash can icon next to the sshKeys key. You will then need to specify keys for each instance, or you will not be able to log in at all. (which may be what you want in a fully automated environment)
Note: Running gcutil ssh will generate a key-pair (if needed) and add it to the sshKeys key.
Google adds these ssh keys to the project ssh-keys automatically. So you need to block project-wide SSH keys: https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#block-project-keys
You can do it via meta-data:
"block-project-ssh-keys": "true"