Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Samples for 3.1.0 with removing cacert.pem from Kafka Extensions #168

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,9 @@ _extensions.csproj_
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.7" />
</ItemGroup>
<ItemGroup>
<None Update="confluent_cloud_cacert.pem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
```

Expand Down
2 changes: 1 addition & 1 deletion samples/container/kafka-function/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN cd /src/java-function-app && \
cd ./target/azure-functions/ && \
cd $(ls -d */|head -n 1) && \
cp ../../../extensions.csproj . && \
func extensions install --package Microsoft.Azure.WebJobs.Extensions.Kafka --version 3.0.0 && \
func extensions install --package Microsoft.Azure.WebJobs.Extensions.Kafka --version 3.1.0 && \
cp -a . /home/site/wwwroot

# This Zulu OpenJDK Dockerfile and corresponding Docker image are
Expand Down
7 changes: 1 addition & 6 deletions samples/container/kafka-function/extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.7" />
</ItemGroup>
<ItemGroup>
<None Update="confluent_cloud_cacert.pem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
5 changes: 0 additions & 5 deletions samples/dotnet/ConsoleConsumer/ConsoleConsumer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,4 @@
<PackageReference Include="Confluent.SchemaRegistry" Version="1.4.3" />
<PackageReference Include="Confluent.SchemaRegistry.Serdes.Avro" Version="1.4.3" />
</ItemGroup>
<ItemGroup>
<None Update="cacert.pem">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
3,338 changes: 0 additions & 3,338 deletions samples/dotnet/ConsoleConsumer/cacert.pem

This file was deleted.

5 changes: 0 additions & 5 deletions samples/dotnet/ConsoleProducer/ConsoleProducer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@
<PackageReference Include="Confluent.SchemaRegistry" Version="1.4.3" />
<PackageReference Include="Confluent.SchemaRegistry.Serdes.Protobuf" Version="1.4.3" />
</ItemGroup>
<ItemGroup>
<None Update="cacert.pem">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
3,338 changes: 0 additions & 3,338 deletions samples/dotnet/ConsoleProducer/cacert.pem

This file was deleted.

10 changes: 1 addition & 9 deletions samples/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ This repo has two java samples. One is for Confluent. The other is the local Kaf
| KafkaTrigger-Java | Simple Kafka trigger sample | local |
| KafkaTrigger-Java-Many | Kafka batch processing sample with Confluent Cloud | confluent |

### Modify TriggerFunction.java (Windows user only)

If you want to run the sample on your Windows with Confluent Cloud and you are not using DevContainer, uncomment the following line. It is the settings of the CA certificate. .NET Core that is azure functions host language can not access the Windows registry, which means it can not access the CA certificate of the Confluent Cloud.

```java
sslCaLocation = "confluent_cloud_cacert.pem",
```

### Build and package the app

```bash
Expand All @@ -101,7 +93,7 @@ $ mvn clean package

## Install the KafkaTriggerExtension

Install extension script for installing the Kafka extension. For windows, It also install `confluent_cloud_cacert.pem`.
Install extension script for installing the Kafka extension.

_windows_

Expand Down
3,466 changes: 0 additions & 3,466 deletions samples/java/confluent/confluent_cloud_cacert.pem

This file was deleted.

7 changes: 1 addition & 6 deletions samples/java/confluent/extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.7" />
</ItemGroup>
<ItemGroup>
<None Update="confluent_cloud_cacert.pem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
5 changes: 1 addition & 4 deletions samples/java/confluent/install_extension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# TODO remove installing Kafka Extension after the extension bundile for kafka is implemented.

$FunctionAppName = "kafka-function-20190419163130420"
$ExtensionVersion = "3.0.0"

# For windows uncomment this for using confluent cloud.
cp confluent_cloud_cacert.pem target\azure-functions\${FunctionAppName}
$ExtensionVersion = "3.1.0"

pushd .
cd target\azure-functions\${FunctionAppName}
Expand Down
2 changes: 1 addition & 1 deletion samples/java/confluent/install_extension.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# TODO remove installing Kafka Extension after the extension bundile for kafka is implemented.

FUNCTION_APP_NAME=kafka-function-20190419163130420
EXTENSION_VERSION=3.0.0
EXTENSION_VERSION=3.1.0

# For windows uncomment this for using confluent cloud.
# cp confluent_cloud_cacert.pem target/azure-functions/${FUNCTION_APP_NAME}
Expand Down
Loading