How do I provide the correct permissions for a Github Workflow? - github-actions

I have a GitHub runner installed on an on-premise Windows Server 2016 that pickups up a Github action workflow. I installed the Runner as NETWORK SERVICE and have tried running it as other users out of desperation (Administrator, Local Service, Local System). Regardless of what user I have tried thus far, I get the following error:
ERROR ( message: The W3SVC service is not available - try starting the service first. )
I have verified that the service is running, and I am able to run the same command I have in my Github YAML file successfully from PowerShell on the on-premise machine. I have included the line from my YAML file below.
- name: Stop IIS Site and Pool
run: 'c:\windows\system32\inetsrv\appcmd.exe stop site "ORXApi1"'

Related

OpenShift post deployment initialisation script

I have an OpenShift 3.11 project using PHP and I would like to execute a script to configure the pod after it is deployed. The first thing the script will do is to create a symbolic link from the pod to the PV named /storage so that I can display the reports in the reports directory on the PV in a browser. I would also like to copy an image from my image directory - the image will indicate whether the application is running on the development system, the test system or production. The name of the appropriate image will be held in a config map which is tailored to each system.
I did consider OpenShift's Pod Based Lifecycle Hooks but they appear to run in a separate pod to the application that is deployed so the symbolic link will not be created in the application pod. The OpenShift documentation mentions you can change your image's ENTRYPOINT. The example shows running a Java application however I still require the PHP and Apache image to be deployed in addition to creating the symbolic link and copying the image.
Is it possible to perform post deployment configuration of a pod in OpenShift and if so how is it done?

Zabbix scheduled reports configuration - Cannot connect to web service: couldn't connect to server

I recently upgraded Zabbix to 5.4.1 and I wanted to start using scheduled report, but I've got some problems with conifguration (error Cannot connect to web service: couldn't connect to server).
My Zabbix is running in Docker on Debian Buster. Everything is based on official containers:
Zabbix Server (PostgreSQL), Zabbix Frontend (Apache, PostreSQL) and PostgreSQL12.
According do documentation (https://www.zabbix.com/documentation/current/manual/appendix/install/web_service) I installed Google Chrome browser:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
and Zabbix Web Service
wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix-release/zabbix-release_5.4-1+debian10_all.deb
dpkg -i zabbix-release_5.4-1+debian10_all.deb
apt install zabbix-web-service
I eddited zabbix_web_service.conf:
AllowedIP=127.0.0.1,::1,0.0.0.0/0,zabbix
I edited zabbix_server.conf:
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
I eddited settings in Zabbix Frontend - Administration -> General -> Other
Frontend URL: http://localhost:8085 (frontend is available at port 8085)
But when I try to test report generating i get error:
Cannot connect to web service: couldn't connect to server
I've already tried with other Frontend URLs, but nothings seems to work. I tried with:
http://localhost:10053/report
http://192.168.10.18:8085/
http://192.168.10.18:10053/report
I've verified that I get answear from http://192.168.10.18:10053/report :
{"detail":"Method is not supported."}
What else can I check/try?
I found the problem. In server configuration I was usinng address http://localhost:10053/report it was wrong because in my case Zabbix server is running in docker and Zabbix web service is not running in docker. Zabbix server wasn't albe to connect to web servcie because it was in the other network. I changed the configuration and now everything works fine. Reports are beeing generated and send

Redhat Openshift 4 - Not able to make mysql connection from php pod to mysql pod

I am user of Openshift online and OKD. I am facing similar issue in both places. Please have a look.
I have created a project.
I have launched php in Developer's Catalog option. With other details, I entered my project's git url, project is cloned successfully. Now it needs to connect to mysql database only.
In Pods, I deployed mysql image from 'Deploy Image' option. It is launched successfully.
When I make mysql connection from php pod to mysql pod, it does not connect, connection time out.
How should I make connection?
Note :
I do not have datastore option to launch mysql from developer's catalog in openshift online, that's why I am launching mysql image from deploy image.
As you mentioned you are using Openshift Online and OKD and you are facing the issue at both places.
You can not create mysql from development store because currently, the OpenShift Online catalog does not provide MySQL template via the web interface directly, but you can deploy the MySQL template using the oc CLI instead. The database deployment is simplified when using templates.
Once logged in with the oc CLI, running
oc new-app -L
will list all of the templates that we were used to seeing in the web console, including the mysql-persistent. Then, you can specify all the template parameters via the oc CLI, e.g.:
oc new-app mysql-persistent -p MYSQL_USER=<desired_DB_username> -p MYSQL_PASSWORD=<mysql_password> -p MYSQL_DATABASE=<desired_database_name>
If you'd like to see all the supported template parameters, you can use
oc process <template_name> --parameters -n openshift
or, for a more detailed output,
oc describe template <template_name> -n openshift
Once the app is launched successfully, you can find this app's hostname in services and connect to it from your php pod after defining host name in php configuration file.

How to start the tutorials-IoT.Sensors services to start in linux instance in FIWARE Lab

I recently deployed an instance of Ubuntu 16.04 on FIWARE Lab and accessed it using putty, I downloaded docker & docker-compose, I successfully installed fiware-orion & mongo-db as I followed the tutorial, I tried to follow the iot sensor tutorial but whenever I try to start the service it keeps stucking in this infinte loop -> Context Broker HTTP state : 000 (waiting for 200).
Any suggestions?
Details
region:crete
image: ubuntu 16.04
putty infinite loop
The problem was that the docker-compose did not include Orion (and MongoDB) instance which are required dependencies for this tutorial. We have updated the corresponding docker-compose file in order to include both dependencies and now it is working properly. Tips: do not forget to open the corresponding port (3000) in the security and assign a floating IP to the virtual machine to access to the /device/monitor (do not use localhost for accessing it).

Deployment to Google’s Compute Engine fails: Error retrieving the App Engine service account

After I’ve deleted some values (do not remember which) in my project configuration (in the Developer Console) I cannot deploy an app to a Compute Engine instance. I’ve deployed the same code using the same configuration dozens of times successfully but after deleting some values in the Developer Console or doing some other adjustments that I considered minor, the deployment, using Maven plugin v2.0.9.95.v20160203, fails with
[INFO] Beginning deployment...
[INFO] WARNING: If this is your first deployment, please try again.
[INFO] ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
[INFO] Bad Request Unexpected HTTP status 400.
[INFO] Failed Project Preparation (app_id='s~some-id'). Error retrieving the App Engine service account.
[ERROR] Error: gcloud app command with exit code : 1
I run
mvn clean validate gcloud:deploy
Unlike in some other of my projects I do not have both of the accounts
App Engine default service account - some-id#appspot.gserviceaccount.com
Compute Engine default service account - some-id-compute#developer.gserviceaccount.com
…in my Permissions section but only the 2. account.
Maybe you deleted your App Engine service account. To create it again, you can go to the Permissions section of your project and add a new member with the email YOUR-PROJECT-ID#appspot.gserviceaccount.com (replace with your real project id) and "Can Edit" permissions.
Maybe you're not authenticated to your project anymore? Have you tried to reauthenticate using gcloud auth login?
If you're authenticated but happen somehow to delete default Google AppEngine service account (app_id#appspot.gserviceaccount.com), you won't be able to recreate them yourself. You will need to file a support ticket with Google and ask them to recreate the default service account for you.
Finally, you can create new project and deploy your application there but of course this comes at a price/time.